Skip to main content
GameDev.net gamedev.net
🔒 Locked

Quick vertex array question...

Started by kwijibo Nov 18, 2005 at 2:40 PM 3 replies 1.2k views
Original Post
kwijibo
kwijibo
When I render indexed vertex arrays with glDrawElements(), which data can be shared/indexed? Do I have to supply normals, tex coords etc on a per-vertex basis, or do I have to store them per-index?
dave
dave
Hi bud,

Only vertices where the vertex-data needs to be exactly the same between primitives can be shared between primitives. If two primitives have avertex in exactly the same place with exactly the same texture coordinates, but need different normals, there have to be two separate vertices.

Hope that helps,

ace
kwijibo
kwijibo
Right...so when rendering a textured cube for example, I can't have shared vertices between faces, because each vertex needs to have different texture coordinates and normals?
dave
dave
Correct,

ace
kwijibo
kwijibo
Thanks a lot. Rating++

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.