diff options
author | Harvey Harrison <[email protected]> | 2012-08-24 13:28:30 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-08-24 13:30:08 -0700 |
commit | a05734591fd53a3ee4d2cc0a388fa0c3086366b9 (patch) | |
tree | 57bbacd9d7ba60629fdc49c7b86ddf9564407a04 | |
parent | 473514cc39b204ecc8b70aa5e7ae6e9bd4b9b26e (diff) |
j3dcore: cleanup feature test to look directly at extensions
Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r-- | src/classes/share/javax/media/j3d/JoglPipeline.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/classes/share/javax/media/j3d/JoglPipeline.java b/src/classes/share/javax/media/j3d/JoglPipeline.java index 39df173..124b81c 100644 --- a/src/classes/share/javax/media/j3d/JoglPipeline.java +++ b/src/classes/share/javax/media/j3d/JoglPipeline.java @@ -7574,10 +7574,14 @@ class JoglPipeline extends Pipeline { private void checkGLSLShaderExtensions(Canvas3D cv, JoglContext ctx, GL gl, - boolean glslLibraryAvailable) { - if (glslLibraryAvailable && - gl.isExtensionAvailable("GL_ARB_shader_objects") && - gl.isExtensionAvailable("GL_ARB_shading_language_100")) { + boolean hasgl13) { + + // Force shaders to be disabled, since no multitexture support + if (!hasgl13) + return; + + if (gl.isExtensionAvailable("GL_ARB_shader_objects") && + gl.isExtensionAvailable("GL_ARB_shading_language_100")) { // Initialize shader vertex attribute function pointers ctx.initGLSLVertexAttributeImpl(); @@ -7744,12 +7748,7 @@ class JoglPipeline extends Pipeline { checkTextureExtensions(cv, ctx, gl, gl13); // Check shader extensions - if (gl13) { - checkGLSLShaderExtensions(cv, ctx, gl, true); - } else { - // Force shaders to be disabled, since no multitexture support - checkGLSLShaderExtensions(cv, ctx, gl, false); - } + checkGLSLShaderExtensions(cv, ctx, gl, gl13); // Setup GL_SUN_gloabl_alpha // FIXME: SUN_global_alpha |