Advertisement Jump to content
Sign in to follow this  
Dark Schneider

Advice about D3DX and TriangleStrips

This topic is 4932 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

With the method ID3DXMesh::Optimize (or OptimizeInPlace) we can select two methods, the VERTEXCACHE or the STRIPREORDER, this second one is ideal for transforming later our mesh to strips. But there is a pair of problems: 1) With the method D3DXConvertMeshSubsetToSingleStrip we convert the entire mesh in only one strip, but this function don't use the degenerated triangles (I don't know why), if you need an image I have one that demostrates it. And between figures you can see the triangle. Maybe the nVidia nvStrip apply them correctly. 2) With D3DXConvertMeshSubsetToStrips, we have many strips, so we need more calls to API with DrawIndexedPrimitive, that suppose more CPU cost, so it is not good idea too. For that, and without trying the nvStrip, or if you want to use the runtime methods of D3DX Optimizes, the best option is to use optimized TRIANGLELIST, for a pair of reasons too: 1) Many drivers load them, if we use the STRIPREORDER option as STRIPS, but at DRIVER LEVEL, so we don't need to worry about multiple calls to API Draw, and I imagine that it don't cost CPU time. 2) If not, we can use the VERTEXCACHE option, that in some cases is better that STRIPS (in the Geforce4 MX it is true, I have tried it), so we can give the option of optimize method to user with only changing one parameter in one line, easy. Usually for hardwares where STRIPS are better, driver convert automatically the mesh into STRIPS if we have ordered it with the STRIPREORDER parameter. In the ATI document "ATI-DX9_Optimization.pdf" we read: "Using triangle strips can provide simple yet pretty good mesh optimization, since strips guarantee that at least two vertices per triangle are reused. To minimize the driver overhead of rendering small triangle lists it is beneficial to concatenate short lists into longer ones with degenerate triangles. If number of degenerate triangles is relatively high, it might be better to use strip ordered triangle lists. All TnL-capable ATI hardware has very efficient hardware implementation of triangle lists; so on any RADEON family hardware strip ordered triangle lists are just as good as triangle strips. Considering that triangle lists are much more flexible than triangle strips, in many cases they might be a preferred choice." This document is for Radeon8500 or superior.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!