diff options
author | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
commit | ab48dac3f4419ceac51fdf059f310f0f0499c4d7 (patch) | |
tree | a255186720c566af8a14281ff99dfde3434075cc /src/jogl/classes/com/jogamp/opengl/util/glsl | |
parent | a140ed4798896ed5d786fbe63e7241309a4b4a91 (diff) |
FIX: Refactor GLArrayData and all it's implementations/sub-interfaces (VBO target, comments, names)
VBO target: Allowing ELEMENT_VERTEX_ARRAY w/o corresponding GLSL/Fixed attribute
Names: Clarified method named.
Comments: Added and fixed comments
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/glsl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java index 95a550ab6..1ce39d557 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java @@ -39,7 +39,7 @@ public class GLSLArrayHandler implements GLArrayHandler { this.ad = ad; } - protected final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) { + private final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) { st.glVertexAttribPointer(gl, ad); } @@ -61,21 +61,21 @@ public class GLSLArrayHandler implements GLArrayHandler { if(ad.isVBO()) { // always bind and refresh the VBO mgr, // in case more than one gl*Pointer objects are in use - glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName()); - if(!ad.isBufferWritten()) { + glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName()); + if(!ad.isVBOWritten()) { if(null!=buffer) { - glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage()); + glsl.glBufferData(ad.getVBOTarget(), buffer.limit() * ad.getComponentSize(), buffer, ad.getVBOUsage()); } - ad.setBufferWritten(true); + ad.setVBOWritten(true); } passVertexAttribPointer(glsl, st); } else if(null!=buffer) { passVertexAttribPointer(glsl, st); - ad.setBufferWritten(true); + ad.setVBOWritten(true); } } else { if(ad.isVBO()) { - glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0); + glsl.glBindBuffer(ad.getVBOTarget(), 0); } st.glDisableVertexAttribArray(glsl, ad.getName()); } |