A more efficient way?
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
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]
...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
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
Generally indexed triangle strips will not give you better performance than indexed triangle lists, and lists are much easier to do.
~CGameProgrammer( );
-- Post screenshots of your projects. There''s already 134 screenshot posts.
~CGameProgrammer( );
-- Post screenshots of your projects. There''s already 134 screenshot posts.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement