A more efficient way?

Started by
4 comments, last by Atthestart 20 years, 1 month ago
Hi again! I''m going through: http://www.andypike.com/Tutorials/DirectX8/003.asp Andy uses 3 triangle strips, one fo the top, one for the sides and one for the bottom. I get that okay, although just wondering there are 3 calls to DrawPrimitive(). I''m guessing the lower the number of calls the better, so how else could this be done more efficiently? Thanks! ATS
Advertisement
DrawIndexedPrimitive with 8 vertices and the correct indices will do it in one call and fewer overall vertices. That would be a triangle list. If you want to stay with strips, you could look into degenerate triangles.

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
"That would be a triangle list. If you want to stay with strips, you could look into degenerate triangles."

...I take it that triangle lists are more efficient then than triangle strips?

[edited by - Atthestart on February 21, 2004 1:38:06 PM]
If you are not talking about indexed primitives, strips are better than lists because they decrease vertex count and possibly other factors. If you are talking about indexed lists, the vertex count argument changes.

For a cube, discussions about which is better are fairly moot. For a real mesh, indexed lists are generally preferable because they offer the greatest flexibility for the least hassle. There are tools that can generate strips for complex geometry, but the advantage is open for debate, especially at this stage in your understanding.

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
Generally indexed triangle strips will not give you better performance than indexed triangle lists, and lists are much easier to do.

~CGameProgrammer( );

Screenshots of your games or desktop captures -- Post screenshots of your projects. There''s already 134 screenshot posts.
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Cheers guys!

This topic is closed to new replies.

Advertisement