PDA

View Full Version : How do I specify per-vertex normals?



JoryRFerrell
10-30-2012, 02:55 PM
How do I specify per-vertex normals? Do I simply define a normal before each and every single vert, like I would for a set of faces? :dejection:

tonyo_au
10-30-2012, 05:26 PM
Yes - see glnormal3f

Aleksandar
10-30-2012, 05:44 PM
You are probably talking about legacy OpenGL. Well, it is a state-machine, and everything set before calling glVertex*() is used for that vertex. If every vertex has a different normal, then yes, you need to call glNormal*() before every glVertex*(). If several verices share same normal, then call glNormal*() just once before those vertices.