Sign in to follow this  

What things should we recreate after Device reset?

Recommended Posts

Well not really everything created with the d3d device. For example shaders and declarations do not have to destroyed and recreated. I suppose anything that is created with the option of specifying the D3DPOOL it's created is a candidate for recreation.

Share this post

Link to post
Share on other sites
Original post by Namethatnobodyelsetook
While shaders are somehow immune, Stateblocks must be destroyed and created.
Simply put, this also means that you have to reset all of the renderstates you set, too. For example, if you did this:

d3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );

and then the device was reset, you would have to set that renderstate again.

Share this post

Link to post
Share on other sites
To sum up: An incomplete list:

- swap chains
- depth buffer
- Non-D3DPOOL_DEFAULT objects (textures, VBs, render targets, IBs)
- state blocks
- render states
- fonts
- meshes
- sprites

Only shaders (since DX8) and Non-D3DPOOL_DEFAULT resources survive a call to Reset().

This way - when resetting - you can do everything you would do when creating the device.

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