Jump to content
  • Advertisement

Archived

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

quanzero

glArrayElement() Error...

This topic is 5228 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
Advertisement
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

  • 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!