diff options
author | Sven Gothel <[email protected]> | 2012-10-10 17:37:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-10 17:37:38 +0200 |
commit | 8582ece7dc7f65271b3184261697a542766d9864 (patch) | |
tree | ceac339e2c0282419aa2bbc9c4ec222eca9d084e /src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java | |
parent | fb3795504f7b05000651a9ea558dbb1b2a3b16f5 (diff) |
Simplify GLArrayHandler and reduce VBO sideffects
VBO: Always unbind VBO ASAP after data transfer (glBufferData())
and assignment (glVertexPointer(..), glVertexAttribPointer()).
It's a bug to leave it bound .. due to redundancy
and other calls which could have change the VBO binding.
Removed syncData(..), now it's only issued at enable
and hence migrated into the enable method.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java index 22690b06d..2049f9618 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java @@ -38,17 +38,12 @@ import javax.media.opengl.*; public interface GLArrayHandler { /** - * Implementation shall associate the data with the array - * and synchronize the data with the GPU. - * - * @param gl current GL object - * @param enable true if array data shall be valid, otherwise false. - * @param ext extension object allowing passing of an implementation detail - */ - public void syncData(GL gl, boolean enable, Object ext); - - /** * Implementation shall enable or disable the array state. + * <p> + * Before enabling the array state, + * implementation shall associate the data with the array + * and synchronize the data with the GPU. + * </p> * * @param gl current GL object * @param enable true if array shall be enabled, otherwise false. |