diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-16 10:46:02 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-16 10:59:16 -0700 |
commit | 52f2d45d070342b82dee9fcac325b8535f3adc65 (patch) | |
tree | 7071372b1337d928545993b66c2e22f832f1443f | |
parent | 6250b3223a24701fe62bd56d1dd3422d3a372570 (diff) |
do not warn on gl emulation code if INCLUDE_FULL_LIBRARY is set, only error at runtime
-rw-r--r-- | src/library_gl.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index d69a479f..dc1c1fc6 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -4040,24 +4040,36 @@ var LibraryGL = { #else // LEGACY_GL_EMULATION // Warn if code tries to use various emulation stuff, when emulation is disabled + // (do not warn if INCLUDE_FULL_LIBRARY is one, because then likely the gl code will + // not be called anyhow, leave only the runtime aborts) glVertexPointer__deps: [function() { +#if INCLUDE_FULL_LIBRARY == 0 warn('Legacy GL function (glVertexPointer) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'); +#endif }], glVertexPointer: function(){ throw 'Legacy GL function (glVertexPointer) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; }, glGenVertexArrays__deps: [function() { +#if INCLUDE_FULL_LIBRARY == 0 warn('Legacy GL function (glGenVertexArrays) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'); +#endif }], glGenVertexArrays: function(){ throw 'Legacy GL function (glGenVertexArrays) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; }, glMatrixMode__deps: [function() { +#if INCLUDE_FULL_LIBRARY == 0 warn('Legacy GL function (glMatrixMode) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'); +#endif }], glMatrixMode: function(){ throw 'Legacy GL function (glMatrixMode) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; }, glBegin__deps: [function() { +#if INCLUDE_FULL_LIBRARY == 0 warn('Legacy GL function (glBegin) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'); +#endif }], glBegin: function(){ throw 'Legacy GL function (glBegin) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; }, glLoadIdentity__deps: [function() { +#if INCLUDE_FULL_LIBRARY == 0 warn('Legacy GL function (glLoadIdentity) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'); +#endif }], glLoadIdentity: function(){ throw 'Legacy GL function (glLoadIdentity) called. You need to compile with -s LEGACY_GL_EMULATION=1 to enable legacy GL emulation.'; }, |