Indexed Vertex Array with normals!

Started by
0 comments, last by dragon376 22 years, 10 months ago
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
Advertisement
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

This topic is closed to new replies.

Advertisement