Re-Starting TriStrips

Started by
22 comments, last by ET3D 17 years, 12 months ago
When drawing triangle strips, there's a situation where the strip is stopped and needs to be restarted within the single draw command. I remebr that a dummy vertex introduced that tells the driver to restart the primitive. What's that vertex? The last vertex used or the one before? Thanks.
Advertisement
I'm not aware of there being a standard code for this in Direct3D - I've got a feeling that the XBox (or maybe another console) supported it though.

It won't always work, but you could try degenerate triangles (where 2 vertices are the same position/properties). These can be useful if you need to go around sharp corners etc...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Im' pretty sure it's mentioned in the Real-Time rendering book, but i forgot what vertex, it's called ... re-start pt or so and it's available in DX8 and OpenGL.
Quote:Original post by quaker
Im' pretty sure it's mentioned in the Real-Time rendering book
I just had a flick through the my copy of Real-Time Rendering (2nd Ed) and I can't find any obvious mention of this.

Got a page, chapter or section reference?

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

I don't have the book, but as I remebr it's mentioned in the primitve types/optimization pages. Look for the word triangle strips.
I had another quick look - admittedly I don't have the time to actually re-read every word...

Even Google doesn't pull up anything D3D related.

To be completely honest, I don't think it exists. As I previously stated, I have heard of such a feature - but on one (or more) of the consoles; not regular desktop parts.

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by quaker
When drawing triangle strips, there's a situation where the strip is stopped and needs to be restarted within the single draw command.


I assume you mean that the situation is when you want to start a new strip in the same draw command. This can be done by adding degenerate triangles, which is done by duplicating vertices.

Don't do that. Just use indexed vertices. They're simpler to understand and more efficient.
Well this feature does exists in low-end gaming hardware, and not only consoles. Tp prove so, please check out the extension NV_primitive_restart, which works for all primitive types.

I guess I could figure out how to do that using standard OpenGL/Direct3D drawing commands. Just make the next tri-strip vertex the last one used. The driver will stop there either drawing a nonvisible triangle (line) and treat the next sequence of vertices as a new tri-strips command.

Thanks.
If I understood correctly you are searching for degenerate triangles.
You can read about them here
Thanks for the NV_primitive_restart reference. There's nothing like this in Direct3D that I know of (although it's possible that there's an NVIDIA hack). As I said before, I'd suggest using an indexed triangle list.

This topic is closed to new replies.

Advertisement