openGL glDrawElements with interleaved buffers
问题 Thus far i have only used glDrawArrays and would like to move over to using an index buffer and indexed triangles. I am drawing a somewhat complicated object with texture coords, normals and vertex coords. All this data is gathered into a single interleaved vertex buffer and drawn using calls similar to ( Assuming all the serup is done correctly ): glVertexPointer( 3, GL_FLOAT, 22, (char*)m_vertexData ); glNormalPointer( GL_SHORT, 22, (char*)m_vertexData+(12) ); glTexCoordPointer( 2, GL_SHORT