• Advertisement

Archived

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

hmm... multitexturing & VAs

This topic is 5160 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

hey... can anyone tell me why i''m only getting multiTexture[0] blended over the model, not blended over texture unit 0? Texture unit 0 doesnt show up at all. Thanks. glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_NORMAL_ARRAY ); glNormalPointer ( GL_FLOAT, 0, vaData.normals); glClientActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(3, GL_FLOAT, 0, vaData[i].texCoords); glBindTexture(GL_TEXTURE_2D, vaData[i].textureID); glClientActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_BLEND); glTexCoordPointer(3, GL_FLOAT, 0, vaData[i].texCoords); glBindTexture(GL_TEXTURE_2D, this->multiTexture[0]); glColor3ub(255, 255, 255); glVertexPointer (3, GL_FLOAT, 0, vaData[i].vertices); glDrawArrays(GL_TRIANGLES, 0, vaData[i].numVertices / 3); glDisable(GL_BLEND);

Share this post


Link to post
Share on other sites
Advertisement
glClientActiveTextureARB is used for setting the texture coordinates for each texture addressing unit. For setting the texture that is to be used for each texture unit, you must first specify the unit via glActiveTextureARB.

Share this post


Link to post
Share on other sites

  • Advertisement