Archived

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

glArrayElement() Error...

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

glNormalPointer(GL_FLOAT, 0, m_pVertexNormals); glVertexPointer(3, GL_FLOAT, 0, m_pVertices); glTexCoordPointer(2, GL_FLOAT, 0, m_pTexCoords); When we use this function ,,,Error!!!! //----------------------------------- unsigned int *pIndices = pNode->m_pIndices; glBegin(GL_TRIANGLES); glArrayElement(pIndices); glEnd(); //----------------------------------- I have Enabled the gl Vertex Arrar,Noral Arra,,,,,, My pIndices Array is also right... but why ?????? please help me,,,,

Share this post


Link to post
Share on other sites
glArrayElement takes a single index by value and dereferece the enabled arrays using that single index. If you have a set of indices, you have to manually loop through each index in the array, and pass each of them to glArrayElement...

... or use glDrawElements instead.

Share this post


Link to post
Share on other sites