Jump to content
  • Advertisement

Archived

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

stu_pb

OpenGL Index Buffers in OpenGL...

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

How can I implement index buffers in OpenGL? I use vertex arrays currently similar to the following code glClientActiveTextureARB(GL_TEXTURE0_ARB); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glVertexPointer(3,GL_FLOAT,sizeof(CVec3),m_vVertices); glTexCoordPointer(2,GL_FLOAT,sizeof(CVec3),m_vTexCoords); glClientActiveTextureARB(GL_TEXTURE1_ARB); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2,GL_FLOAT,sizeof(CVec3),m_vTexCoords); m_pTexMan->_Bind(m_iTexture,0); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_REPLACE); m_pTexMan->_Bind(m_iLightMap,1); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE); glDrawArrays(GL_TRIANGLE_STRIP,0,PATCH_VERTICES); I would like to be able to use an index array to render my triangle strips. Thanks for the help! I should probably be working now...

Share this post


Link to post
Share on other sites
Advertisement
Thanks, I can''t believe I couldn''t find that!

I should probably be working now...

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!