summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-01-05 20:13:14 +0100
committerSven Gothel <[email protected]>2012-01-05 20:13:14 +0100
commit0b56df9939bcd2e0e1bd193f597206c60fe56c51 (patch)
treebe145dbcb70966f215d38285b875c3b12f76c129 /src/jogl/classes/javax
parent2a5d6ae3a423d1f03e26503c3af03ce98b812baa (diff)
Fix bug 549 - Incorrect calculation of count value in GLUniformData due to ignored buffer position.
This was disclosed by testing agains the Intel HD 3000 GPU, resulting in an INVALID OPERATION GL error (correct). Other driver ignored this mismatch ..
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLUniformData.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index 5c9388be2..475ff4546 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -107,10 +107,10 @@ public class GLUniformData {
if(data instanceof Buffer) {
final int sz = rows*columns;
final Buffer buffer = (Buffer)data;
- if(buffer.limit()<sz || 0!=buffer.limit()%sz) {
- throw new GLException("data buffer size invalid: new buffer limit: "+buffer.limit()+"\n\t"+this);
+ if(buffer.remaining()<sz || 0!=buffer.remaining()%sz) {
+ throw new GLException("remaining data buffer size invalid: buffer: "+buffer.toString()+"\n\t"+this);
}
- this.count=buffer.limit()/(rows*columns);
+ this.count=buffer.remaining()/(rows*columns);
} else {
if(isMatrix) {
throw new GLException("Atom type not allowed for matrix : "+this);