From 6fd9c3d84e1758ae27cd10a89237a558460ca1fb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Jan 2013 12:22:54 +0100 Subject: Fix GLArrayDataClient createGLSL(..) 'name' setting; Also adds equal behavior for Client/Server FFP usage. - GLArrayDataWrapper's init() only validated and set the 'name' for VBO ARRAY_BUFFER usage and validates it, regardless of FFP or GLSL usage. - GLArrayDataWrapper's init() included the no-VBO case to the above 'name' set/validate code path. --- src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java index 7d08ad08f..f3fa5012f 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java @@ -307,9 +307,9 @@ public class GLArrayDataWrapper implements GLArrayData { // We can't have any dependence on the FixedFuncUtil class here for build bootstrapping reasons if( GL.GL_ELEMENT_ARRAY_BUFFER == vboTarget ) { - // ok .. - } else if( GL.GL_ARRAY_BUFFER == vboTarget ) { - // check name .. + // OK .. + } else if( ( 0 == vboUsage && 0 == vboTarget ) || GL.GL_ARRAY_BUFFER == vboTarget ) { + // Set/Check name .. - Required for GLSL case. Validation and debug-name for FFP. this.name = ( null == name ) ? GLPointerFuncUtil.getPredefinedArrayIndexName(index) : name ; if(null == this.name ) { throw new GLException("Not a valid array buffer index: "+index); -- cgit v1.2.3