diff options
author | Sven Gothel <[email protected]> | 2011-08-22 16:38:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-22 16:38:45 +0200 |
commit | 87ff90fb03216737df70ff83246664b7fba2663e (patch) | |
tree | d62c0a3c95e2f1eabd9fa69a95c814c668c4ff15 /src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java | |
parent | 6602d8eb5af13dc317fff8e044db52c3388f99fa (diff) |
Fix regression of commit 6c346d98f04e2355210960fe9ffde47432f04d62, where VBO/attribute binding wasn't updated (VBO data written, shader change/switch attribute on same location) ; Optimized interleaved GLSL VBO binding, hence split up GLArrayHandler syncData/enableState
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java index 38379877f..5c4aa718c 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java @@ -51,16 +51,20 @@ public class GLSLArrayHandlerFlat implements GLArrayHandler { throw new UnsupportedOperationException(); } - public final void enableBuffer(GL gl, boolean enable) { - GL2ES2 glsl = gl.getGL2ES2(); + public final void syncData(GL gl, boolean enable) { + if(enable) { + st.vertexAttribPointer(gl.getGL2ES2(), ad); + } + } + + public final void enableState(GL gl, boolean enable) { + final GL2ES2 glsl = gl.getGL2ES2(); if(enable) { - st.vertexAttribPointer(glsl, ad); st.enableVertexAttribArray(glsl, ad); } else { st.disableVertexAttribArray(glsl, ad); } - } - + } } |