# Triangle Strip Issue With A Square

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

## Recommended Posts

Hi, I'm basically rendering 4 squares within a square using TriangleStrip. One of the squares has a point that's being transformed and rotated. But besides that, assuming there is no transformation at all, the issue is rendering 4 squares within a square. I can only render 2 squares so far since the Triangles connect
 Vertex_List2(0) = Create_TLVertex(50, 0, 0, 1, Color, 0, 0, 0) Vertex_List2(1) = Create_TLVertex(100, 0, 0, 1, Color, 0, 0, 0) Vertex_List2(2) = Create_TLVertex(50, 50, 0, 1, Color, 0, 0, 0) 'CENTER OF ENTIRE SQUARE Vertex_List2(3) = Create_TLVertex(100, 0, Y, 0, 1, Color, 0, 0, 0) Vertex_List2(4) = Create_TLVertex(50, 100, 0, 1, Color, 0, 0, 0) Vertex_List2(5) = Create_TLVertex(100, 100, 0, 1, Color, 0, 0, 0) Vertex_List2(6) = Create_TLVertex(100, 50, 0, 1, Color, 0, 0, 0) 

And this makes 4 nice triangles (2 squares). As for the other 2 which should complete the square, it doesn't connect. Im needing vertices (0, 0), (50, 0), (0, 50), (50, 50), (0, 100), and (50, 100). Also of the 4 square that need drawn, square #2 must be first (top right square) How can I do this without resortng to using a Trianglelist? Thanks in advance. Hopefully the solution is simple. It has something to do with the order of my vertices.

##### Share on other sites
This is an image if my problem. V6, V7, and V8 are needed but I'm unable to find the proper order

##### Share on other sites
Hi!

If you use an index buffer you can specify the special index 0xffff (16 bit) or 0xffffffff (32 bit) to tell the graphics card to start a new triangle strip. This way you can draw multiple strips that are independent from each other in a single draw call. This is mentioned here.

That should make things easier.

##### Share on other sites
I'd personally recommend junking strips and using a triangle list with an index buffer. Read this: http://tomsdxfaq.blogspot.com/2005_12_01_archive.html#113546220006246490

##### Share on other sites
TriangleList and Index Buffer works! Thanks guys

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 11
• 24
• 43
• 75