We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isCurrentContextWebGL2
1 parent 07010b9 commit c3d33aaCopy full SHA for c3d33aa
src/library_webgl.js
@@ -10,8 +10,9 @@
10
11
{{{
12
globalThis.isCurrentContextWebGL2 = () => {
13
+ // This function should only be called inside of `#if MAX_WEBGL_VERSION >= 2` blocks
14
+ assert(MAX_WEBGL_VERSION >= 2, 'isCurrentContextWebGL2 called without webgl2 support');
15
if (MIN_WEBGL_VERSION >= 2) return 'true';
- if (MAX_WEBGL_VERSION <= 1) return 'false';
16
return 'GL.currentContext.version >= 2';
17
}
18
null;
0 commit comments