diff options
Diffstat (limited to 'src/library_gl.js')
-rw-r--r-- | src/library_gl.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 3eba76d0..2be48ba1 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1517,6 +1517,8 @@ var LibraryGL = { Module.printErr('WARNING: using emscripten GL immediate mode emulation. This is very limited in what it supports'); GL.immediate.initted = true; + if (!Module.useWebGL) return; // a 2D canvas may be currently used TODO: make sure we are actually called in that case + this.matrixStack['m'] = []; this.matrixStack['p'] = []; for (var i = 0; i < GL.immediate.MAX_TEXTURES; i++) { |