What things should we recreate after Device reset?
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.
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!
Or in other words, you must re-set everything which is Initialized with the help of Direct3D9 Device!
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.
Quote:Original post by NamethatnobodyelsetookSimply put, this also means that you have to reset all of the renderstates you set, too. For example, if you did this:
While shaders are somehow immune, Stateblocks must be destroyed and created.
d3dDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );
and then the device was reset, you would have to set that renderstate again.
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.
- 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
Popular Topics
Advertisement