From 7a2c2f5722ad297e0373ca1f31b54a1ab876f67d Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 16 Feb 2012 10:22:37 -0800 Subject: j3dcore: mark all occurences of GL_SUN_global_alpha as FIXME The hilarious part is, the JOGL1 pipeline never used this feature anyway as when it tested for the extension, there was a typo 'gloabl' which meant it never was counted as available by the Canvas3D class...fun. Likely this all just needs removing and replacing with vertex(?) shaders, there is also API that exposes this in the Pipeline interface that should be killed as it was only to expose this feature: Pipeline:setGlobalAlpha Pipeline:disableGlobalAlpha Canvas3D:setGlobalAlpha Canvas3D:supportGlobalAlpha GeometryArrayRetained:disableGlobalAlpha ...and more. Signed-off-by: Harvey Harrison --- src/classes/jogl/javax/media/j3d/JoglPipeline.java | 67 +++++++++++----------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'src/classes') diff --git a/src/classes/jogl/javax/media/j3d/JoglPipeline.java b/src/classes/jogl/javax/media/j3d/JoglPipeline.java index 744cf43..1ed004e 100644 --- a/src/classes/jogl/javax/media/j3d/JoglPipeline.java +++ b/src/classes/jogl/javax/media/j3d/JoglPipeline.java @@ -384,13 +384,14 @@ class JoglPipeline extends Pipeline { gl.glDisableClientState(GL2.GL_COLOR_ARRAY); } - if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { - if (useAlpha) { - gl.glEnable(GL.GL_GLOBAL_ALPHA_SUN); - } else { - gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); - } - } +// FIXME: SUN_global_alpha +// if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { +// if (useAlpha) { +// gl.glEnable(GL.GL_GLOBAL_ALPHA_SUN); +// } else { +// gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); +// } +// } if ((vformat & GeometryArray.COORDINATES) != 0) { gl.glEnableClientState(GL2.GL_VERTEX_ARRAY); @@ -402,16 +403,16 @@ class JoglPipeline extends Pipeline { void disableGlobalAlpha(Context ctx, GeometryArrayRetained geo, int vformat, boolean useAlpha, boolean ignoreVertexColors) { if (VERBOSE) System.err.println("JoglPipeline.disableGlobalAlpha()"); +// FIXME: SUN_global_alpha +// GL gl = context(ctx).getGL(); - GL gl = context(ctx).getGL(); - - if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { - if (!ignoreVertexColors && ((vformat & GeometryArray.COLOR) != 0)) { - if (useAlpha) { - gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); - } - } - } +// if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { +// if (!ignoreVertexColors && ((vformat & GeometryArray.COLOR) != 0)) { +// if (useAlpha) { +// gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); +// } +// } +// } } // used for GeometryArrays @@ -6596,12 +6597,12 @@ class JoglPipeline extends Pipeline { void setGlobalAlpha(Context ctx, float alpha) { if (VERBOSE) System.err.println("JoglPipeline.setGlobalAlpha()"); - - GL gl = context(ctx).getGL(); - if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { - gl.glEnable(GL.GL_GLOBAL_ALPHA_SUN); - gl.glGlobalAlphaFactorfSUN(alpha); - } +// FIXME: SUN_global_alpha +// GL gl = context(ctx).getGL(); +// if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { +// gl.glEnable(GL.GL_GLOBAL_ALPHA_SUN); +// gl.glGlobalAlphaFactorfSUN(alpha); +// } } // Native method to update separate specular color control @@ -7742,9 +7743,10 @@ class JoglPipeline extends Pipeline { } // Setup GL_SUN_gloabl_alpha - if (gl.isExtensionAvailable("GL_SUN_gloabl_alpha")) { - cv.extensionsSupported |= Canvas3D.SUN_GLOBAL_ALPHA; - } +// FIXME: SUN_global_alpha +// if (gl.isExtensionAvailable("GL_SUN_gloabl_alpha")) { +// cv.extensionsSupported |= Canvas3D.SUN_GLOBAL_ALPHA; +// } cv.textureBoundaryWidthMax = 1; { @@ -7800,10 +7802,10 @@ class JoglPipeline extends Pipeline { if (gl.isExtensionAvailable("GL_SGI_texture_color_table")) { gl.glDisable(GL.GL_TEXTURE_COLOR_TABLE_SGI); } - - if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { - gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); - } +// FIXME: SUN_global_alpha +// if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { +// gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); +// } } @@ -7820,9 +7822,10 @@ class JoglPipeline extends Pipeline { // gl.glDisable(GL2.GL_CLIP_PLANE0 + i); // } - if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { - gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); - } +// FIXME: SUN_global_alpha +// if (gl.isExtensionAvailable("GL_SUN_global_alpha")) { +// gl.glDisable(GL.GL_GLOBAL_ALPHA_SUN); +// } } private void copyTranspose(double[] src, double[] dst) { -- cgit v1.2.3