Sign in to follow this  
Calefaction

glNormalPointer question

Recommended Posts

Okay, so I am a bit confused. I know there are two types of normals...vertex normals and face normals. When using glVertexPointer, which one is it expecting? If it is the face normals, how does it know which order they are supposed to be in, in terms of the other elements of my various vertex arrays (specifically the data passed in via glVertexPointer). The whole difference between face and vertex normals and their various uses has always perplexed me a bit...

Share this post


Link to post
Share on other sites
When drawing a vertex array, the same index is used for all enabled arrays, so there should be exactly one normal in the normal array for each vertex in the vertex array.

Whether you get (the effect of) face or vertex normals depends on the shading model (glShadeModel). GL_SMOOTH (default) will specify the color per vertex, and interpolate to get color values between vertices. GL_FLAT will shade the entire primitive with the same color.

edit: Oh man, that was late...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this