Jump to content
  • Advertisement
Sign in to follow this  
HeartFlowing

How to use face-normal of a mesh

This topic is 4158 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!