Jump to content
  • Advertisement
Sign in to follow this  
quaker

Re-Starting TriStrips

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!