blob: fcf485dbe18fbd468f0f320567e77e6f6bb0310d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!DOCTYPE html>
<html>
<title>WebGPU delay getCurrentTexture (ref)</title>
<meta charset="utf-8" />
<link rel="help" href="https://gpuweb.github.io/gpuweb/" />
<canvas id="cvs0" width="20" height="20" style="width: 20px; height: 20px;"></canvas>
<script>
function draw(canvas) {
var c = document.getElementById(canvas);
var ctx = c.getContext('2d');
ctx.fillStyle = '#00FF00';
ctx.fillRect(0, 0, c.width, c.height);
}
draw('cvs0');
</script>
</html>
|