diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java index 238e402d1..1292a9298 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java +++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java @@ -422,12 +422,12 @@ public class ImmModeSink { if ( GL_QUADS == mode && !gl.isGL2() ) { if( GL.GL_UNSIGNED_BYTE == type ) { final ByteBuffer b = (ByteBuffer) indices; - for (int j = 0; j < b.remaining(); j++) { + for (int j = b.position(); j < b.remaining(); j++) { gl.glDrawArrays(GL.GL_TRIANGLE_FAN, (int)(0x000000ff & b.get(j)), 4); } } else { final ShortBuffer b = (ShortBuffer) indices; - for (int j = 0; j < b.remaining(); j++) { + for (int j = b.position(); j < b.remaining(); j++) { gl.glDrawArrays(GL.GL_TRIANGLE_FAN, (int)(0x0000ffff & b.get(j)), 4); } } |