Jump to content
  • Advertisement
Sign in to follow this  

DirectX fast switch between Fullscreen-Windowed mode

This topic is 4414 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 guys! I'm just done searching this site, and still have a question. There is a way to fast switch between fullscreen and windowed mode? What I mean: currently my app when switching to fullscreen or windowed mode it releases all textures etc. and recreating it back after device is restored. But there is a lot of textures are loaded, so it takes too long time, and QA says that we need to decrease this time. I've saw the game, when you can switch between fullscreen and windwed and it was done less than a second. My app is using directx 7. Please, help!

Share this post


Link to post
Share on other sites
Advertisement
In DirectX 7 it's not possible.

All resources in the default memory pool have to be released and re-created when the device is reset - which you need to do to change screen modes.
If you were using DX8 or 9, then you could put most things into the managed pool, which doesn't need to have resources released before resetting the device. Unfortunately, the managed pool doesn't exist on DX7.

Share this post


Link to post
Share on other sites
A possibility I see for improving loading time would be to reduce the calculations that need to be done in order to reload everything when you reset.

For example, if you're using a heightmap terrain, you could save your generated buffers in system memory, after loading the heightmap. In case you need to reset, you wouldn't need to perform any calculations again, you'd only need to upload the already computed data from system memory to GPU memory. Not fast, but at least faster.
This method could be applied to many situations.

You could even take this further and save a copy of textures in their GPU memory format. Doing this, which might be a bit difficult, would save you some loading time on these resources, hopefully reducing reset time.

In a way, this is like writing code to create managed-pool resources, with lesser functionality. Not perfect, but surely might help :).

Hope this helps.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!