gl.glMatrixMode(GL.GL_TEXTURE);
gl.glActiveTexture(GL.GL_TEXTURE0);
gl.glPushMatrix();
gl.glLoadIdentity();
...
gl.glPopMatrix();
Misunderstanding this feature can also easily lead to stack under flow if you change the active texture in between push and pop pairs.
Of course in retrospect, it's obvious that each texture unit needs its own matrix, but it's just one of those little details that's not well described in the man pages.
your site is very informative
ReplyDeleteThank you
iPhone application development