[MDX] Polygon/vertex count

Started by
2 comments, last by remigius 17 years, 12 months ago
How many polygons/vertecies can a good graphics card display and still keeping a good framerate (25-30 fps)? Using Managed directx
Advertisement
As always, it depends...

There is no real relation between graphics card capabilities and the number of polygons/vertices you can render, for neither Managed DirectX nor plain DirectX. Current video cards are optimized for batch submission, so you may be able to render millions of polygons, provided you render them all in one batch (i.e. one DrawIndexedPrimitve, DrawPrimitive or Mesh.DrawSubset call, or simply a draw call).

Since it is unlikely that you'll have all of your scene's polygons/verts contained in a single vertexbuffer, you will have to use some form of batching when you need it. A basic example of batching is putting multiple (pretransformed) objects into a single vertexbuffer so they can be rendered with one draw call. A more advanced from of batching is instancing (more info), which allows you to to send the geometry and instance data to the video card seperately (from an apps point of view). This will allow you to efficiently render similar meshes many more times than you would be able to by drawing them one by one.

Batch submission however isn't the definite solution for fixing your framerate. It probably wouldn't make sense to stuff all of your objects into a single vertex/indexbuffer for optimal batch submission, so don't go over the top with this. Changing render states, render targets and the like can also be very costly operations and as such might also be good places to start for optimizing performance.

Hope this helps :)
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!
Thak you. Batching seems perfect for my application. I will have about 5000 meshes all looking the same. Can anyone explain how to do this in greater detail, or point me to a tutorial. I am using MDX
If they're all the same, then instancing should work out best for you. Over here you can find two sample projects on how to do instancing in MDX:

http://www.mdxinfo.com/tutorials/instancing.php
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement