Archived

This topic is now archived and is closed to further replies.

The C modest god

Direct3D speed issue

Recommended Posts

If a mesh of 3000 polygons is rendered using direct3D, and it is not visible in the scene. Would directx check for the visibilty of each of the triangles in the mesh? or will it do first a check for a box of the mesh? In other words, should I make a visiblity check of a box of a mesh before I send it to being draw by direct3D?

Share this post


Link to post
Share on other sites
Yes that would be a wise thing to do. D3DX has a D3DXcomputeboundingbox function which computes the aabb.
You can then use a frustum culling function to see if it''s in the frustum completely, partially or not at all.

Share this post


Link to post
Share on other sites
If you DrawSubset a mesh, Direct3D will not check whether it's in the view frustum or not. It'll cull back-facing polygons, and send [the remaining triangles] to the card.

Some detonator nVidia drivers did a quick aabb-in-frustum test on data sent to them, but I don't know if that's still true with the latest driver incarnation (called ForceWire or such a thing. I forgot the name)

Generally, the app is always expected to do the visibility determination.

[edit]Clarification

[edited by - Coder on November 16, 2003 7:12:07 AM]

Share this post


Link to post
Share on other sites