Skip to main content
gamedev.net
🔒 Locked

glArrayElement() Error...

Started by quanzero Mar 24, 2004 at 4:50 AM 0 replies 250+ views
Original Post
quanzero
quanzero
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,,,,
OMG.That is me?!Why he like a pig?!God:you are VIP(Very Important Pig)
Brother Bob
Brother Bob
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.