#### Archived

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

# Extremely Simple Question(I hope) about Triangle List/List Triangle Strip

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

## Recommended Posts

Hello Folks, again thanks so much for all the help you have given me. I am trying to optimize my dungeon area. I have done a decent job so far and have come to another step. Etnu was nice enough to help point me to the primitive type I needed to use but I have a question. Right now, I have, lets say 100 Quads, all are the same size, but they have a random texture assigned. I suggested that I would send a list of quads to the DrawPrimitive command that shared the same texture. However, since these were not in order(touching necessarily), I can''t use a TriangleStrip. I was told I could use a Triangle List. Now here is where my questions come in. Right now I only generate 4 Vertices and use a Triangle Strip. Currently I intentionally use only one texture so that I "could" send them all at once. However my rendering engine renders them one at a time(the quads) just in case they have different textures. So if I turn them into Triangle Lists then I have to add two more vertices. Will that poorly affect performance etc compared to what I am doing now? I have 8 different textures it can be so there will be 8 different vertex buffers(which share their common texture). I just didn''t want to change my code to add new vertices and extra work, if it was a bad idea to group them and display them in groups of 8 Drawprimitives, compared to just rendering the 800 walls 1 at a time. silly question maybe but I had to ask Thanks!!

##### Share on other sites
It will effect performance, but it''s a relatively small cost, unless you start rendering several hundred thousand vertices.

If that''s the case, you''ll probably need to draw indexed primitives, like so:

Quad:+----+|    ||    ||    ||    |+----+Vertices:1 = Top Left2 = Top Right3 = Bottom Left4 = Bottom RightIndices:1 = 12 = 23 = 34 = 25 = 36 = 4indexed quad:+----+|   /||  / || /  ||/   |+----+(sorry about the scaling, my ascii art skills aren''t nearly as uber as some).

##### Share on other sites
ahh cool, ok so still use the triangle list, but using it with indexed vertices... Cool I was thinking that, but I just didn''t want to start making loads of changes without getting some advice first.

Thanks again so much Etnu :-0)

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 19
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633363
• Total Posts
3011509
• ### Who's Online (See full list)

There are no registered users currently online

×