From 875042340b68137b584907c539b7b7ecc5c5b15c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 5 Mar 2012 03:50:06 +0100 Subject: Fix GLArrayDataServer.destroy(GL): vboName was cleared by super class before deletion --- src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/util') 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; } -- cgit v1.2.3