diff options
author | Sven Gothel <[email protected]> | 2023-03-07 17:56:08 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-07 17:56:08 +0100 |
commit | 90a95e6f689b479f3c3ae3caf4e30447030c7682 (patch) | |
tree | e230c2efb8d9e0b79b51610be2d3661c51f34128 /src/test/com | |
parent | 8fbb5bb2f4312b52c24375db3055198a18d66319 (diff) |
GLArrayData: Promote sealed() from GLArrayDataEditable, to correctly being used for getElemCount() instead of 0==position, ... (API change)
API Change
- sealed() moved up from GLArrayDataEditable -> GLArrayData
- GLArrayDataWrapper is sealed by default
- getSizeInBytes() -> getByteCount()
- Semantics of getElemCount() and getByteCount()
- Correctly use sealed() to switch from position to limit - instead of 0==position
Aligned method names:
- getElemCount()
- elemPosition()
- remainingElems()
- getElemCapacity()
to corresponding byte counts:
- getByteCount()
- bytePosition()
- remainingBytes()
- getByteCapacity()
Diffstat (limited to 'src/test/com')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java index ccd3a1ef0..882cb2c5f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java @@ -68,7 +68,7 @@ public class GearsObjectES1 extends GearsObject { if( validateBuffers ) { final int bufferTarget = array.getVBOTarget(); final int bufferName = array.getVBOName(); - final long bufferSize = array.getSizeInBytes(); + final long bufferSize = array.getByteCount(); final int hasBufferName = gl.getBoundBuffer(bufferTarget); final GLBufferStorage hasStorage = gl.getBufferStorage(hasBufferName); final boolean ok = bufferName == hasBufferName && diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java index 763dbd1ba..a74b6e6f1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java @@ -100,7 +100,7 @@ public class GearsObjectES2 extends GearsObject { array.bindBuffer(gl, true); final int bufferTarget = array.getVBOTarget(); final int bufferName = array.getVBOName(); - final long bufferSize = array.getSizeInBytes(); + final long bufferSize = array.getByteCount(); final int hasBufferName = gl.getBoundBuffer(bufferTarget); final GLBufferStorage hasStorage = gl.getBufferStorage(hasBufferName); final boolean ok = bufferName == hasBufferName && 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 696c02490..6a7479993 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 @@ -57,7 +57,7 @@ public class GLSLMiscHelper { gl.glGetVertexAttribiv(data.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, qi, 0); Assert.assertEquals(data.getVBOName(), qi[0]); final GLBufferStorage glStore = gl.getBufferStorage(data.getVBOName()); - Assert.assertEquals("GLBufferStorage size mismatch, storage "+glStore, data.getSizeInBytes(), null != glStore ? glStore.getSize() : -1); + Assert.assertEquals("GLBufferStorage size mismatch, storage "+glStore, data.getByteCount(), null != glStore ? glStore.getSize() : -1); } public static void pause(final long ms) throws InterruptedException { |