PDA

View Full Version : How to: glNormalPointer and glDrawElements



10-05-2003, 05:16 PM
I know how: draw geometry with glDrawElements

Not know how: define normals with glNormalPointer
Not know how: define colors with glColorPointer

When I try glNormalPointer or glColorPointer, none of geometry looks correct. I not know if normals defined with each vertex, or with each face. If normals defined with each vertex, how do I if faces sharing vertex have separate colors... This is confusing of me. I ask that somebody can please help me?! I thank you.

Mazy
10-05-2003, 10:21 PM
when using arrays you must have a normal for each vertex, and a color for each vertex as well.. the vertex array and other arrays should have the same size.

10-06-2003, 03:01 AM
I not know about this. The model is faces sharing vertex then I absolutely must smooth normals in code yes?