Sign in to follow this  

How to use face-normal of a mesh

This topic is 3881 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

here is a mesh: 1.vertex data array 2.texture coordinate array 3.face normal array:with 3 index of vertex, and 1 face normal how do I use 'glDrawElements()'to display this mesh?? someone's suggestion: 1.convert the face-normal to vertex normal : just add all face-normals of each vertex(means faces indexing the vertex) and normalize, than I can get vertex-normal but, here is a problem: if a plane is 'with two face lighting', then a vertex of the plane may have two opposite normal which form a ZERO-normal(error occur). and some other problems. 2.copy out all the vertices occording to the faces. copy three vertices occording to each face's three indices, then evaluate these three vertices with the same normal of the face. and now we use glDrawArray() insteading of glDrawElements() PS:maybe I have not described precisely. but do help me!

Share this post

Link to post
Share on other sites
Sign in to follow this