What things should we recreate after Device reset?

Started by
5 comments, last by JensE 19 years, 6 months ago
Hi Is there any place where I can find a list of all things that we should rebuild after Device gets reset? Thanks in advance.
Advertisement
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!
Except resources created in D3DPOOL_MANAGED.

Regards,
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.
[size=2]aliak.net
While shaders are somehow immune, Stateblocks must be destroyed and created.
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.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
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.

This topic is closed to new replies.

Advertisement