From 8582ece7dc7f65271b3184261697a542766d9864 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 10 Oct 2012 17:37:38 +0200 Subject: 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. --- src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java index 134dd9677..5a1524d05 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java @@ -167,13 +167,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData } else { ext = null; } - if(enable) { - glArrayHandler.syncData(gl, true, ext); - glArrayHandler.enableState(gl, true, ext); - } else { - glArrayHandler.enableState(gl, false, ext); - glArrayHandler.syncData(gl, false, ext); - } + glArrayHandler.enableState(gl, enable, ext); bufferEnabled = enable; } } -- cgit v1.2.3