aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-03 12:22:54 +0100
committerSven Gothel <[email protected]>2013-01-03 12:22:54 +0100
commit6fd9c3d84e1758ae27cd10a89237a558460ca1fb (patch)
treefd16276bc515347a5647665858c81f1e7a45d8bb /src
parent921b33825340d27deec2883ded21cb7434decc94 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java6
1 files changed, 3 insertions, 3 deletions
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);