Sign in to follow this  
alpha44

What things should we recreate after Device reset?

Recommended Posts

The Lion King    115
I am not sure if there is a list. But I think everything ... from VertexBuffer, Sprites, Fonts to Meshes & Textures.

Or in other words, you must re-set everything which is Initialized with the help of Direct3D9 Device!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Except resources created in D3DPOOL_MANAGED.

Regards,

Share this post


Link to post
Share on other sites
IFooBar    906
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
circlesoft    1178
Quote:
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
JensE    122
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