#### Archived

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

# how many vertices??

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

## Recommended Posts

One of the DrawIndexedPrimitive() parameters is number of vertices. I use triangle list and index buffer to draw my quads, thus the number of vertices for a quad is reduced from 6 to 4. But, if I put 4n (where n is the total number of quads to draw) for NumVertices in DrawIndexedPrimitive() call, the number of quads I get is n-1 (if I have 50 quads, I only see 49 quads). If I put 6n, I see all of them. But, each quad has only 4 vertices, why should I put 6 vertices for each quad?? I'm somewhat confused here... [edited by - alnite on June 17, 2003 4:40:15 PM]

##### Share on other sites
I did not understand your question fully, but the number of tris to draw should be equal to NumVertices-2(if u draw tristrips), because when you draw a new triangle u reuse two of the previously drawn vertices. Is that what u were asking for?

##### Share on other sites
the first time u draw a quad u need 4 vertices, but using 4n to draw quads is bad if u use tristrips, because after the first quad u only need 2 vertices to draw the second.

is it okay?

##### Share on other sites
ultim, he''s already indicated that he''s using a tri list, not a strip.

alnite, the number of vertices parm is an indicator of how many verts need to be <i>indexed</i>. for a tri list that means 3 verts per triangle, whether they''re verts that are shared or not. what the index buffer does is save the cost of re-processing those verts which have already been processed due to a prior indexing as the vertex stream is processed, since these post-processed verts can be cached. is that the most uses of processed in a sentence or what?!

1. 1
2. 2
Rutin
20
3. 3
khawk
17
4. 4
A4L
14
5. 5

• 12
• 16
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633756
• Total Posts
3013710
×