diff options
author | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-08 14:51:22 +0200 |
commit | ab48dac3f4419ceac51fdf059f310f0f0499c4d7 (patch) | |
tree | a255186720c566af8a14281ff99dfde3434075cc /src/test | |
parent | a140ed4798896ed5d786fbe63e7241309a4b4a91 (diff) |
FIX: Refactor GLArrayData and all it's implementations/sub-interfaces (VBO target, comments, names)
VBO target: Allowing ELEMENT_VERTEX_ARRAY w/o corresponding GLSL/Fixed attribute
Names: Clarified method named.
Comments: Added and fixed comments
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java | 4 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java index f062a7375..9ae317537 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java @@ -82,7 +82,7 @@ public class RedSquare0 implements GLEventListener { Assert.assertTrue(0 <= mgl_Vertex); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); FloatBuffer buffer = Buffers.newDirectFloatBuffer(numElements * components); - GLArrayDataWrapper vertices = GLArrayDataWrapper.createGLSL(gl, "mgl_Vertex", 3, gl.GL_FLOAT, false, 0, buffer, -1, 0); + GLArrayDataWrapper vertices = GLArrayDataWrapper.createGLSL(gl, "mgl_Vertex", 3, gl.GL_FLOAT, false, 0, buffer, -1, 0, 0, 0); { // Fill them up FloatBuffer verticeb = (FloatBuffer) vertices.getBuffer(); @@ -111,7 +111,7 @@ public class RedSquare0 implements GLEventListener { Assert.assertTrue(0 <= mgl_Color); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); buffer = Buffers.newDirectFloatBuffer(numElements * components); - GLArrayDataWrapper colors = GLArrayDataWrapper.createGLSL(gl, "mgl_Color", 4, gl.GL_FLOAT, false, 0, buffer, -1, 0); + GLArrayDataWrapper colors = GLArrayDataWrapper.createGLSL(gl, "mgl_Color", 4, gl.GL_FLOAT, false, 0, buffer, -1, 0, 0, 0); { // Fill them up FloatBuffer colorb = (FloatBuffer) colors.getBuffer(); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java index 96a830a53..67e400f29 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java @@ -63,9 +63,9 @@ public class ReadBuffer2Screen extends ReadBufferBase { //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", // 2, GL.GL_FLOAT, true, 4); readTextureVertices = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", - 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); readTextureVertices.setEnableAlways(enableBufferAlways); - readTextureVertices.setVBOUsage(enableBufferVBO); + readTextureVertices.setVBOEnabled(enableBufferVBO); { FloatBuffer vb = (FloatBuffer)readTextureVertices.getBuffer(); vb.put(-f_edge); vb.put(-f_edge); @@ -155,9 +155,9 @@ public class ReadBuffer2Screen extends ReadBufferBase { void updateTextureCoords(GL gl, boolean force) { if(force || null==readTextureCoords) { readTextureCoords = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, "mgl_MultiTexCoord0", - 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW); + 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER); readTextureCoords.setEnableAlways(enableBufferAlways); - readTextureCoords.setVBOUsage(enableBufferVBO); + readTextureCoords.setVBOEnabled(enableBufferVBO); { TextureCoords coords = readBufferUtil.getTexture().getImageTexCoords(); FloatBuffer cb = (FloatBuffer)readTextureCoords.getBuffer(); |