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/jogl/classes/jogamp | |
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/jogl/classes/jogamp')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java index 6c497c9e3..558fa88f2 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java @@ -93,7 +93,7 @@ public class GLSLArrayHandler extends GLVBOArrayHandler { if(!ad.isVBOWritten()) { glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName()); if(null!=buffer) { - glsl.glBufferData(ad.getVBOTarget(), ad.getSizeInBytes(), buffer, ad.getVBOUsage()); + glsl.glBufferData(ad.getVBOTarget(), ad.getByteCount(), buffer, ad.getVBOUsage()); } ad.setVBOWritten(true); st.vertexAttribPointer(glsl, ad); @@ -144,7 +144,7 @@ public class GLSLArrayHandler extends GLVBOArrayHandler { if(!ad.isVBOWritten()) { glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName()); if(null!=buffer) { - glsl.glBufferData(ad.getVBOTarget(), ad.getSizeInBytes(), buffer, ad.getVBOUsage()); + glsl.glBufferData(ad.getVBOTarget(), ad.getByteCount(), buffer, ad.getVBOUsage()); } ad.setVBOWritten(true); glsl.glVertexAttribPointer(ad); |