Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Indexed Vertex Array with normals!

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 dragon376   Members   

140
Like
Likes
Like

Posted 22 June 2001 - 11:01 PM

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

#2 Krippy2k   Members   

134
Like
Likes
Like

Posted 23 June 2001 - 03:31 AM

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.