Archived

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

What does DrawSubset do behind the scenes?

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

MSDN has this to say: Draws a subset of a mesh. Real helpful... So what exactly does it do? Does it simply set the vertex and index buffers for that mesh and call DrawIndexedPrimitive? If so, I can''t see how it would be very efficient...drawing the mesh twice would set the vertex buffer twice when if you managed it yourself that would be easy to fix. I was going to generate a mesh from each patch of my terrain, and then I could make a progressive mesh out of it for an easy level of detail. It would also make it easier to manage my SetTexture calls. If it does set the vertex buffer every time it''s called that''s not what I want at all.

Share this post


Link to post
Share on other sites
I can''t tell you exactly what it does behind scenes, but I do know that it''s unoptimized and people usually code their own method of drawing a subset. This way the know what''s going on, and can customize it (optimize it) to their specific purposes.

Share this post


Link to post
Share on other sites
quote:
If it does set the vertex buffer every time it''s called that''s not what I want at all.

A guy from the d3d team mentioned - on DIRECTXDEV - that it sets all the required states every time it''s called.

You can always use the cool functionality - optimizing, conversion to strips, progressive meshes, enhanced meshes - and then render it on your own (retrieve the buffers and the attribute table, and there you go)

Peace,
Muhammad Haggag

Share this post


Link to post
Share on other sites