aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-05 03:50:06 +0100
committerSven Gothel <[email protected]>2012-03-05 03:50:06 +0100
commit875042340b68137b584907c539b7b7ecc5c5b15c (patch)
treed24f1c3956a5edfe0a9697903777016e6d453cc9 /src/jogl/classes/com/jogamp/opengl
parent006e9fe402a0a47b45fd2c4af51296aef895e8b5 (diff)
Fix GLArrayDataServer.destroy(GL): vboName was cleared by super class before deletion
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-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;
}