aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-12 22:01:24 +0200
committerSven Gothel <[email protected]>2012-10-12 22:01:24 +0200
commite03c5a17f1e6ebe7c8581469f35feb67a7100d15 (patch)
treecf8022663809d0b215d102465fcaf418dda33b7a /src/jogl/classes/com
parentd1537f0359f917e5a6b1e77852fa1b1ac8a54d5f (diff)
FixedFuncHook: Add ES2 alignment of certain GL functions, i.e. GL_QUAD_STRIP/GL_POLYGON/GL_QUADS mapping, glTexImage2D internalformat/format match.
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java4
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);
}
}