aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-27 19:23:15 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-02-27 19:23:15 -0500
commit42da4e19f9d72026be6642c8b54f646c6d828dde (patch)
treefb85330fbffaaa5f904ef6993ac5cdd03ca86368 /src
parent85b862ac83b28519b572777b849f0011dd437ec1 (diff)
FORCE_GL_EMULATION option
Diffstat (limited to 'src')
-rw-r--r--src/library_gl.js5
-rw-r--r--src/settings.js4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 38b330f7..537dce53 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -2867,5 +2867,10 @@ LibraryGL.$GLEmulation__deps.push(function() {
for (var func in Functions.getIndex.tentative) Functions.getIndex(func);
});
+if (FORCE_GL_EMULATION) {
+ LibraryGL.glDrawElements__deps = LibraryGL.glDrawElements__deps.concat('$GLEmulation');
+ LibraryGL.glDrawArrays__deps = LibraryGL.glDrawArrays__deps.concat('$GLEmulation');
+}
+
mergeInto(LibraryManager.library, LibraryGL);
diff --git a/src/settings.js b/src/settings.js
index 4d742060..dbce836d 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -166,6 +166,10 @@ var GL_DEBUG = 0; // Print out all calls into WebGL. As with LIBRARY_DEBUG, you
var GL_TESTING = 0; // When enabled, sets preserveDrawingBuffer in the context, to allow tests to work (but adds overhead)
var GL_MAX_TEMP_BUFFER_SIZE = 2097152; // How large GL emulation temp buffers are
var GL_UNSAFE_OPTS = 1; // Enables some potentially-unsafe optimizations in GL emulation code
+var FORCE_GL_EMULATION = 0; // Forces inclusion of GL emulation code. This lets you use non-WebGL features
+ // like clientside data. GL commands that are not in WebGL will automatically
+ // include this feature, but if you just use pure GLES commands *and* need
+ // emualation, you will need to enable it manually with this flag.
var DISABLE_EXCEPTION_CATCHING = 0; // Disables generating code to actually catch exceptions. If the code you
// are compiling does not actually rely on catching exceptions (but the