aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjuj <jujjyl@gmail.com>2014-02-06 19:34:42 +0200
committerjuj <jujjyl@gmail.com>2014-02-06 19:34:42 +0200
commit51d39aaa3dda0a7f433fa38c365f86011b5fe84c (patch)
tree45b896a7ec0ff865ad8d444828d06bdf53411f2b
parent7e44599fca76438e262844fcef213ba8ee53ea20 (diff)
parent62ca84acedd1eeefc1db06393b6c633d84e5213a (diff)
Merge pull request #2082 from inolen/oes_stdder
don't check to enable OES_standard_derivatives in GL.getSource
-rw-r--r--src/library_gl.js4
-rw-r--r--tests/hello_world_gles_deriv.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 0a30292a..baa0597d 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -210,6 +210,7 @@ var LibraryGL = {
}
},
+#if LEGACY_GL_EMULATION
// Find a token in a shader source string
findToken: function(source, token) {
function isIdentChar(ch) {
@@ -238,6 +239,7 @@ var LibraryGL = {
} while (true);
return false;
},
+#endif
getSource: function(shader, count, string, length) {
var source = '';
@@ -255,6 +257,7 @@ var LibraryGL = {
}
source += frag;
}
+#if LEGACY_GL_EMULATION
// Let's see if we need to enable the standard derivatives extension
type = GLctx.getShaderParameter(GL.shaders[shader], 0x8B4F /* GL_SHADER_TYPE */);
if (type == 0x8B30 /* GL_FRAGMENT_SHADER */) {
@@ -270,6 +273,7 @@ var LibraryGL = {
#endif
}
}
+#endif
return source;
},
diff --git a/tests/hello_world_gles_deriv.c b/tests/hello_world_gles_deriv.c
index c5354d4e..592078ed 100644
--- a/tests/hello_world_gles_deriv.c
+++ b/tests/hello_world_gles_deriv.c
@@ -645,6 +645,7 @@ static const char vertex_shader[] =
static const char fragment_shader[] =
"#ifdef GL_ES\n"
+"#extension GL_OES_standard_derivatives : enable\n"
"precision mediump float;\n"
"#endif\n"
"varying vec4 Color;\n"