Archived

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

stu_pb

OpenGL Index Buffers in OpenGL...

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