aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
index 8d9d839e2..5b7ce4970 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
@@ -301,10 +301,13 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
//
public void destroy(GL gl) {
+ // super.destroy(gl):
+ // - GLArrayDataClient.destroy(gl): disables & clears client-side buffer
+ // - GLArrayDataWrapper.destroy(gl) (clears all values 'vboName' ..)
+ int _vboName = vboName;
super.destroy(gl);
- if(vboName!=0) {
- int[] tmp = new int[1];
- tmp[0] = vboName;
+ if(_vboName!=0) {
+ final int[] tmp = new int[] { _vboName } ;
gl.glDeleteBuffers(1, tmp, 0);
vboName = 0;
}