Sign in to follow this  

what to reset after losing focus in a fullscreen application?

Recommended Posts

All i know is that you have to reload sprites and fonts (i'm a beginner)
You can do that like this:

D3dSprite->OnLostDevice(); // Tells Direct3DSprite that d3ddev has been
// Lost and to release the memory of the sprite

d3ddev->Reset(&d3dpp); // resets d3ddev

D3dSprite->OnResetDevice(); // Reaquires the sprite memory

Share this post

Link to post
Share on other sites
You have to recreate all D3DPOOL_DEFAULT resources. They need to be released prior to reset, and then created again post-reset.

Turn on Direct3D debug output in the DirectX control panel, and then watch the 'Output' window in your debugger when you reset the device. It'll tell you if there are resources that you still need to release when you reset.

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