Original Post
How do I find the vertex normals for a mesh. I know the equations and I know that you have o average the face normals. But how do I write a function that does that. I tried using D3DXComputeNormals() but for some reasons all the normals I get are poinintg in the positive direction. My main obstacle is that to compute the face normal, I need to have three vertecies that define a riangle. If I have a mesh of 4000 something verts, I don't know whih vertecies make up a triangle. In the vertex buffer, are the vertecies put in a liniar order? Meaning thet (lets say p_vert is a pointer to a locked mem of vertex buffer) p_vert[0], p_vert[1], p_vert[2], does that define a first triangle and p_vert[2], p_vert[3], p_vert[4] define a second etc? Im lost please help.