5 var canvas2d
= document
.createElement('canvas')
6 canvas2d
.setAttribute('width', 0)
7 document
.body
.appendChild(canvas2d
)
8 var ctx2d
= canvas2d
.getContext('2d')
9 ctx2d
.fillStyle
= 'black'
10 var gl
= document
.createElement('canvas').getContext('experimental-webgl')
11 gl
.texImage2D(gl
.TEXTURE_2D
, 0, gl
.RGBA
, gl
.RGBA
, gl
.UNSIGNED_BYTE
, canvas2d
)
12 ctx2d
.fillRect(0, 0, 1, 1)