# DrawIndexedPrimitive()

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

## Recommended Posts

Hi guys, I don't understand something about drawing indexed primitives. Let's say my model is a cube, that would mean my geometry buffer would be length 8, one for each vertex and my index buffer would be length 36, 3 for each triangle times 2 triangles per side times 6 sides; is that right ?

What about the normals ? Each vertex really has 3 normals depending on which triangle it's used for.

Thanks.

##### Share on other sites
If you want your geometry to have unique vertex normals at every vertex, then you need to duplicate the vertices and apply the individual normal vectors as appropriate. In that case, your cube would have 4 vertices * 6 sides = 24 vertices in your vertex buffer.

##### Share on other sites
with geometry shaders normals can be calculated on the fly. but in general doing as Jason Z says is the way to go.

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633694
• Total Posts
3013378
×