From f49f8e22953ed2426fd4264ee407e2dc3fc07cfc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 12 Oct 2012 14:56:20 +0200 Subject: GLArrayData* VBO binding: Adding explicit bindBuffer(..) method, since VBO is not more bound after enableBuffer(); Fix unit test (test VBO bound). Explicit bindBuffer(..) is required now, since enableBuffer() doesn't leave it bound. See fixed VBORegion* patch for use case, i.e. using a VBO index buffer for glDrawElements(). Complets commit 8582ece7dc7f65271b3184261697a542766d9864. --- .../com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java index 297cbbb90..c2285ba25 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java @@ -132,7 +132,7 @@ public class GLSLMiscHelper { Assert.assertTrue(vertices0.sealed()); Assert.assertEquals(4, vertices0.getElementCount()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); - Assert.assertEquals(vertices0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); + Assert.assertEquals(0, gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); // should be cleared ASAP validateGLArrayDataServerState(gl, vertices0); return vertices0; } @@ -152,7 +152,7 @@ public class GLSLMiscHelper { Assert.assertTrue(vertices1.sealed()); Assert.assertEquals(4, vertices1.getElementCount()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); - Assert.assertEquals(vertices1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); + Assert.assertEquals(0, gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); // should be cleared ASAP validateGLArrayDataServerState(gl, vertices1); return vertices1; } @@ -173,7 +173,7 @@ public class GLSLMiscHelper { Assert.assertTrue(colors0.isVBOWritten()); Assert.assertTrue(colors0.sealed()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); - Assert.assertEquals(colors0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); + Assert.assertEquals(0, gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); // should be cleared ASAP validateGLArrayDataServerState(gl, colors0); return colors0; } @@ -191,7 +191,7 @@ public class GLSLMiscHelper { Assert.assertTrue(colors1.isVBOWritten()); Assert.assertTrue(colors1.sealed()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); - Assert.assertEquals(colors1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); + Assert.assertEquals(0, gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER)); // should be cleared ASAP validateGLArrayDataServerState(gl, colors1); return colors1; } -- cgit v1.2.3