Hey, This is proberbly abit of a newb question.
To help me learn more i decided to have a crack at a custom scene node. everything makes sense to me except this part:
"u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };"
I have no idea what the indices are or what there used for, I've done some searching around and the best i could find was that it determines draw Order of the vertex's, If so how does that work?
Thank you for your time!
Custom Scene Node help!
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Custom Scene Node help!
Not just draw order, but they actually define which vertices are used at which point. Since you draw triangles usually, in your example vertices (0,2,3) are used to create the first triangle. The triangle is drawn in that order. Next tri is (2,1,3). Here comes the bonus: You only need four vertices, although you draw six. But vertex 2 is re-used and moreover avoids seams this way, as there is no gap between the adjacent vertices - they are exactly the same.
Re: Custom Scene Node help!
Awesome thanks for the reply. Exactly what i needed to know.^^