Archived

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

dragon376

Indexed Vertex Array with normals!

Recommended Posts

dragon376    140
How do you tell to the function glDrawElement(GL_TRIANGLES,24,GL_UNSIGNED_BYTE, indexes); that you have normals for each vertex in each face? Thanks

Share this post


Link to post
Share on other sites
Krippy2k    134
You need to create an array with just your normals in it, then call glNormalPointer to specify this array and:

glEnableClientState( GL_NORMAL_ARRAY );

Each normal element will belong to the correspond vertex in your vertex array.

Seeya
Krippy

Share this post


Link to post
Share on other sites