summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-07 19:47:07 +0200
committerSven Gothel <[email protected]>2011-10-07 19:47:07 +0200
commitc8eab433735f5da0779843b227e2f0f5057df776 (patch)
tree87bd630759e88e33521d4689783c655a0df45692 /src/jogl/classes/com/jogamp/opengl/util
parentc009b299a7dd885643da8e088a989d2bdf702c3b (diff)
Clarify/Fix GLArrayDataEditable:padding() - no use case yet .. well
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java9
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index 99500adfb..a61fe0d27 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -217,11 +217,11 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
}
- public void padding(int done) {
+ public void padding(int doneInByteSize) {
if ( buffer==null || sealed ) return;
- while(done<strideL) {
+ while(doneInByteSize<strideB) {
Buffers.putb(buffer, (byte)0);
- done++;
+ doneInByteSize++;
}
}
@@ -233,9 +233,10 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
*/
public void put(Buffer v) {
if ( sealed ) return;
+ /** FIXME: isn't true for interleaved arrays !
if(0!=(v.remaining() % strideL)) {
throw new GLException("Buffer length ("+v.remaining()+") is not a multiple of component-stride:\n\t"+this);
- }
+ } */
growBufferIfNecessary(v.remaining());
Buffers.put(buffer, v);
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
index 0da7d1171..bb22a4b7e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
@@ -96,7 +96,7 @@ public interface GLArrayDataEditable extends GLArrayData {
public void seal(boolean seal);
public void rewind();
- public void padding(int done);
+ public void padding(int doneInByteSize);
public void put(Buffer v);
public void putb(byte v);
public void puts(short v);