Login  Register

Re: Problem with client-side textures

Posted by opengltester on Aug 31, 2015; 10:42pm
URL: https://forum.jogamp.org/Problem-with-client-side-textures-tp4035179p4035207.html

There is no VBO in that code: it's old-style code. The flow is

initialization:

<generate texId>
glClientActiveTexture(GL2.GL_TEXTURE1)
gl2.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
gl2.glBindTexture( GL.GL_TEXTURE_2D, texId );
<make texture>

rendering:

 gl.glClientActiveTexture(GL2.GL_TEXTURE1);
 gl.glEnableClientState( GL2.GL_VERTEX_ARRAY );
 gl.glEnableClientState( GL2.GL_TEXTURE_COORD_ARRAY );
<call glVertexPointer>
<call glTexCoordPointer>
<call glDrawArrays>

This works fine with GL_TEXTURE0 but not any other.