diff options
author | Sven Gothel <[email protected]> | 2011-04-22 05:39:21 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-22 05:39:21 +0200 |
commit | 4f7d8a59df48d43a5b7da8bcc7dd406357474eb1 (patch) | |
tree | 117a26f39e5417d644528fd5ec7865596044b688 /src/jogl/classes | |
parent | b3eebc2480bf96df8626d8494692ab5a3b5d88e7 (diff) |
reflect GLContext changes a5430cf16727fdc7bcfb17ef251018cc479d5f5d
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java index c7e845953..3a5a24116 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java @@ -182,9 +182,7 @@ public class ShaderUtil { public Set getShaderBinaryFormats(GL _gl) { GL2ES2 gl = _gl.getGL2ES2(); if(null==shaderBinaryFormats) { - if(gl.getContext()!=GLContext.getCurrent()) { - return new HashSet(0); // bail out - } + gl.getContext().validateCurrent(); int[] param = new int[1]; shaderBinaryFormats = new HashSet(); @@ -208,9 +206,7 @@ public class ShaderUtil { public boolean isShaderCompilerAvailable(GL _gl) { GL2ES2 gl = _gl.getGL2ES2(); if(null==shaderCompilerAvailable) { - if(gl.getContext()!=GLContext.getCurrent()) { - return false; // bail out - } + gl.getContext().validateCurrent(); Set bfs = getShaderBinaryFormats(gl); if(gl.isGLES2()) { byte[] param = new byte[1]; @@ -469,7 +465,7 @@ public class ShaderUtil { Impl impl = (Impl) context.getAttachedObject(ShaderUtil.class.getName()); if (impl == null) { impl = new GL2ES2Impl(); - context.putAttachedObject(ShaderUtil.class.getName(), impl); + context.attachObject(ShaderUtil.class.getName(), impl); } return impl; } |