Jump to content
  • Advertisement


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


Multitexturing with glDrawElements

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

Can someone show me how to do multitexturing with glDrawElements(). I know this question has been asked before but a forum search didn't reveal anything...
glTexCoordPointer(2, GL_FLOAT, sizeof(VERTEX), m_pVertexBuffer[0].u);
glDrawElements( GL_TRIANGLES, m_pNode->m_dwPolyCount, GL_UNSIGNED_SHORT, m_pNode->m_pPolys );
Is there any way to pass the texture coordinates for the second (or third, etc) texture layer to OpenGL....???? -Crawl [edited by - Crawl on June 1, 2002 11:17:51 AM]

Share this post

Link to post
Share on other sites
Thanx, i see their BSP tutorial uses the technique, looked there before but probably not hard enough,.....

Share this post

Link to post
Share on other sites
You need to do something like this ...

glTexCoordPointer(... lightmaps ...);

glTexCoordPointer(... texcoords ...);


Oh ... and make sure that you enable GL_TEXTURE_COORD_ARRAY for each texture unit.

[edited by - Martee on June 1, 2002 1:39:42 PM]

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!