Jump to content
  • Advertisement
Sign in to follow this  
alpha44

What things should we recreate after Device reset?

This topic is 5052 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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!

Share this post


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

Regards,

Share this post


Link to post
Share on other sites
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
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!