Jump to content
  • Advertisement

Archived

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

lc_gta

multitexturing

This topic is 5941 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 all, this is my first attempt at multitexturing and i can''t quite get it to work. Here''s a bit of my code:
  
glVertexPointer(3, GL_FLOAT, 0, vertsBin0);

glClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, scene.texture_container[4]->GetTexID());
glTexCoordPointer(2, GL_FLOAT, 0, tex2Bin0);

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, scene.texture_container[0]->GetTexID());
glTexCoordPointer(2, GL_FLOAT, 0, texBin0);

glDrawArrays(GL_TRIANGLES, 0, bin0count);
  
the second texture is the only one that shows up. I''m sure i''m missing something fairly obvious but most tutorials and samples i''ve been able to find don''t use vertex arrays. any suggestions?? -Lance

Share this post


Link to post
Share on other sites
Advertisement
u need
glClientActiveTextureARB();
+
glActiveTextureARB();

after one u set the vertex array info + after the other u set the texture info

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
quote:
Original post by lc_gta
the second texture is the only one that shows up. I''m sure i''m missing something fairly obvious but most tutorials and samples i''ve been able to find don''t use vertex arrays. any suggestions??



http://www.gamedev.net/community/forums/topic.asp?topic_id=60011

The answer to ya problem should be there

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!