Archived

This topic is now archived and is closed to further replies.

Uberapan

Shared vertices across faces and normal problems

Recommended Posts

Uberapan    122
I am trying to implement a 3d representation of a project I''m working on, and have run into some problems regarding vertices that are shared across faces. This is presumably because glDrawElements needs the indices in a certain way. Is it really not possible to have a single vertex with multiple normals (one per face the vertex is part of)? Some random google hits seemed to suggest this. How is it then best to proceed to add these duplicates to the vertex arrays? Does this have to be done "manually"? An answer would be greatly appreciated.

Share this post


Link to post
Share on other sites
rick_appleton    864
you will have to code it manually yes. Just recreate the indexarray, and check it the vertex you''re reading is already added. Then if the normal and texturecoords are different, you just add it again.

Share this post


Link to post
Share on other sites