diff options
author | Sven Gothel <[email protected]> | 2009-03-20 19:08:41 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-03-20 19:08:41 +0000 |
commit | 58d868d2bd9eb33a6c7e934db91d6fb0db4becab (patch) | |
tree | 9d1f42cce1038a8d55341b73f83e31aa0dd6b783 | |
parent | e4d142fa647f470a9dd434fb89db4425c9b3f527 (diff) |
Fix: glShaderCompilerAvailable() and glGetShaderBinaryFormats()
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1897 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java index 37b19ec8a..2f3710eb2 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java @@ -103,6 +103,9 @@ public Set glGetShaderBinaryFormats() { if(null==shaderBinaryFormats) { + if(getContext()!=GLContext.getCurrent()) { + return new HashSet(0); // bail out + } HashSet formatSet = new HashSet(); int[] param = new int[1]; @@ -126,6 +129,9 @@ public boolean glShaderCompilerAvailable() { if(null==shaderCompilerAvailable) { + if(getContext()!=GLContext.getCurrent()) { + return false; // bail out + } Set bfs = glGetShaderBinaryFormats(); if(isGLES2()) { byte[] param = new byte[1]; |