PDA

View Full Version : Setting normals on faces



Cucus
05-17-2011, 01:52 PM
Hi,

Is there a way to setting up normals just for faces (and not for vertices) without doing an interleaved array?

If I understand, when you do glNormalPointer and glVertexPointer, you're assuming that there's the same number of normals than vertices.

I'm right?

Alfonse Reinheart
05-17-2011, 01:55 PM
Is there a way to setting up normals just for faces (and not for vertices) without doing an interleaved array?

No. Well, "interleaving" isn't necessary, but they both still must be arrays. If you want the effect of a face having a normal, then every vertex on that face must have the same normal. That will require adding a lot of extra positions to your arrays.

Cucus
05-17-2011, 02:06 PM
Ok, thanks!

V-man
05-17-2011, 03:04 PM
Covered in the Wiki @
http://www.opengl.org/wiki/FAQ#Multi_indexed_rendering