Skip to content

Commit 9a5a3f7

Browse files
committed
webgl1
1 parent 3e3d0c5 commit 9a5a3f7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/PenSkin.js

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class PenSkin extends Skin {
9797
this.a_penPoints_loc = gl.getAttribLocation(this._lineShader.program, 'a_penPoints');
9898

9999
if (gl.drawArraysInstanced) {
100+
throw new Error('bad');
100101
// WebGL2 has native instanced rendering
101102
this.instancedRendering = true;
102103
this.glDrawArraysInstanced = gl.drawArraysInstanced.bind(gl);
@@ -113,6 +114,7 @@ class PenSkin extends Skin {
113114
instancedArraysExtension
114115
);
115116
} else {
117+
throw new Error('bad');
116118
// Inefficient but still supported
117119
this.instancedRendering = false;
118120
}

src/RenderWebGL.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class RenderWebGL extends EventEmitter {
148148
antialias: false,
149149
powerPreference: RenderWebGL.powerPreference
150150
};
151-
return twgl.getContext(canvas, contextAttribs);
151+
return canvas.getContext('webgl', contextAttribs);
152152
}
153153

154154
/**

0 commit comments

Comments
 (0)