I have a smal doubt. I’m using vertex arrays in my program and i use the glNormalPointer() to specify the normals. My program runs fine but the object is not affected by the light. I have given an array of face normals to the function glNormalPointer(). Should i give it vertex normals? how do i calculate the vertex normals if so?
better still, is there any software or utility that imports a model and tells us the vertex positions as well as the normals for each vertex?
So, presumably, you’ve resolved your crash…
well yes i did, it was a logical error in a function which combines all the normal arrays. But you see, the normals don’t work. I mean i calculated the normals for each face of the model rather than each vertices and then supplied this array of normals(of faces) to glNormalPointer. I’m using glDrawElements() to draw the vertex. But now i have a doubt whther I should rather calculate the vertex normals.
I don’t know how to calculate the normals for vertices. Can either 3d studio max or maya provide me that data if i import the model to these packages?