diff options
author | Anthony Pesch <inolen@gmail.com> | 2013-08-15 12:14:39 -0700 |
---|---|---|
committer | Anthony Pesch <inolen@gmail.com> | 2013-08-15 12:17:22 -0700 |
commit | deb278c645e1f0c8a5584cc3e0461086860d0e2f (patch) | |
tree | e884402eaa44e71a2ae99953b82c390e3234daed /src | |
parent | 19047555b54a8190a927e77f2d1c73410ad4fd0a (diff) |
move shader compile status check behind GL_DEBUG
Diffstat (limited to 'src')
-rw-r--r-- | src/library_gl.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 17595021..89a13bbe 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1618,17 +1618,15 @@ var LibraryGL = { var glCompileShader = _glCompileShader; _glCompileShader = function(shader) { Module.ctx.compileShader(GL.shaders[shader]); +#if GL_DEBUG if (!Module.ctx.getShaderParameter(GL.shaders[shader], Module.ctx.COMPILE_STATUS)) { Module.printErr('Failed to compile shader: ' + Module.ctx.getShaderInfoLog(GL.shaders[shader])); Module.printErr('Info: ' + JSON.stringify(GL.shaderInfos[shader])); -#if GL_DEBUG Module.printErr('Original source: ' + GL.shaderOriginalSources[shader]); Module.printErr('Source: ' + GL.shaderSources[shader]); throw 'Shader compilation halt'; -#else - Module.printErr('Enable GL_DEBUG to see shader source'); -#endif } +#endif }; GL.programShaders = {}; |