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/GLFixedArrayHandler.java | |
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/GLFixedArrayHandler.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java index f0f5ea896..a825ca690 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java @@ -13,7 +13,7 @@ public class GLFixedArrayHandler implements GLArrayHandler { this.ad = ad; } - protected final void passArrayPointer(GLPointerFunc gl) { + private final void passArrayPointer(GLPointerFunc gl) { switch(ad.getIndex()) { case GLPointerFunc.GL_VERTEX_ARRAY: gl.glVertexPointer(ad); @@ -42,21 +42,21 @@ public class GLFixedArrayHandler implements GLArrayHandler { if(ad.isVBO()) { // always bind and refresh the VBO mgr, // in case more than one gl*Pointer objects are in use - gl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName()); - if(!ad.isBufferWritten()) { + gl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName()); + if(!ad.isVBOWritten()) { if(null!=buffer) { - gl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage()); + gl.glBufferData(ad.getVBOTarget(), buffer.limit() * ad.getComponentSize(), buffer, ad.getVBOUsage()); } - ad.setBufferWritten(true); + ad.setVBOWritten(true); } passArrayPointer(glp); } else if(null!=buffer) { passArrayPointer(glp); - ad.setBufferWritten(true); + ad.setVBOWritten(true); } } else { if(ad.isVBO()) { - gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0); + gl.glBindBuffer(ad.getVBOTarget(), 0); } glp.glDisableClientState(ad.getIndex()); } |