Archived

This topic is now archived and is closed to further replies.

VertexArray + MultiTexturing

This topic is 5239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi


for TU 0
glClientActiveTextureARB( GL_TEXTURE0_ARB );
glTexCoordPointer( 2, GL_FLOAT, 0, pTexCoords );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
glActiveTextureARB( GL_TEXTURE0_ARB);
glEnable( GL_TEXTURE_2D );

bind texture

next TU 1

glClientActiveTextureARB( GL_TEXTURE1_ARB );
glTexCoordPointer( 2, GL_FLOAT, 0, pTexCoords );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
glActiveTextureARB( GL_TEXTURE1_ARB);
glEnable( GL_TEXTURE_2D );

bind texture

next

drawelements ...


after all


// Disable TU''S
glActiveTextureARB( GL_TEXTURE1_ARB );
glDisable( GL_TEXTURE_2D );
//glActiveTextureARB( GL_TEXTURE0_ARB );
//glDisable( GL_TEXTURE_2D );
// Enable TU 0 as default
glActiveTextureARB( GL_TEXTURE0_ARB );
glEnable( GL_TEXTURE_2D );



Share this post


Link to post
Share on other sites