var canvas = <HTMLCanvasElement>document.getElementById('canvas1');
var gl = canvas.getContext('webgl');
canvas.width = 400;
canvas.height = 400;
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
W „HTMLCanvasElement” wydaje się tylko do zaoferowania 2d metod płótnie. To nie pozwoli mi skompilować gl.viewport () itd. W jaki sposób mogę dodać wsparcie dla WebGL?













