diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-25 11:30:15 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-25 11:30:15 -0700 |
commit | 96cdbee9649d440161cff3088ca2a82ec1e54c78 (patch) | |
tree | a80e3e61e955582d7d29bd4d4800901302d96409 /src/library_gl.js | |
parent | 5739787049a07e1bf478af4bffad9e8906fb1e4b (diff) |
allow apps to link both GL and SDL 2D backends and use just one
Diffstat (limited to 'src/library_gl.js')
-rw-r--r-- | src/library_gl.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index adf9d611..fb9a57a0 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -169,6 +169,8 @@ var LibraryGL = { if (GL.initExtensions.done) return; GL.initExtensions.done = true; + if (!Module.useWebGL) return; // an app might link both gl and 2d backends + GL.compressionExt = Module.ctx.getExtension('WEBGL_compressed_texture_s3tc') || Module.ctx.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || Module.ctx.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc'); @@ -1362,7 +1364,7 @@ var LibraryGL = { // GL Immediate mode $GLImmediate__postset: 'Browser.moduleContextCreatedCallbacks.push(function() { GL.immediate.init() });', - $GLImmediate__deps: ['$Browser'], + $GLImmediate__deps: ['$Browser', '$GL'], $GLImmediate: { MAX_TEXTURES: 7, |