Sign in to follow this  
discman1028

About HW/SW vertex processing

Recommended Posts

discman1028    212
Must the following 3 values correspond to use hardware or software vertex processing? Or can you mix them? The reason I ask, is it seems like I specify whether I want "HW (Video mem)" versus "SW (System mem)" in quite a few places... For software: CreateDevice( ..., D3DCREATE_SOFTWARE_VERTEXPROCESSING, ... ) CreateVertexBuffer( ..., D3DUSAGE_SOFTWAREPROCESSING (Usage), ..., D3DPOOL_SYSTEMMEM (instead of managed), ... ) Thanks!

Share this post


Link to post
Share on other sites
Demirug    884
If you use only hardware or software processing you don’t need to specify different usage and pool values for your vertex buffers. The runtime will make it right depending on your creations flags. You only need to specify different usage and pool flags by your own if you are work with mixed vertex processing because the runtime cannot know which vertex buffer will used with software and which will used with hardware vertex processing.

Share this post


Link to post
Share on other sites
Demus79    362

The creation flags need to be in accord with the hw/sw mode of the d3d device (ie. software vertex buffer won't work with hardware accleration and vice versa).

The pool flags, however, are somewhat different. Usually you'll do fine with the "D3DPOOL_MANAGED" pool, but certain things such as render targets or depth stencil surfaces will need "D3DPOOL_DEFAULT" flag.

Check the DX SDK for details. Managed resources for example do not need to be recreated when device is lost, on the contrary default resources must be released and recreated by your program.

And yes, in the situation of Mixed SW/HW vertex processing you need to create corresponding Vertex/Index buffers for the different processing modes. I got tired with it and dropped out the mixed mode.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this