From a05734591fd53a3ee4d2cc0a388fa0c3086366b9 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Fri, 24 Aug 2012 13:28:30 -0700 Subject: j3dcore: cleanup feature test to look directly at extensions Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/JoglPipeline.java | 19 +++++++++---------- 1 file 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 -- cgit v1.2.3