Jump to content
  • Advertisement

Archived

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

code_evo

hmm... multitexturing & VAs

This topic is 5309 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!