Jump to content
  • Advertisement
Sign in to follow this  
michaelbeirne

BackBuffer Scale

This topic is 4627 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

Can someone tell me how to resize the backbuffer to the size of a resizable window? Is this possible without resetting the device and if not, whats the cost of resetting the d3ddevice? Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Resizing the actual buffer at runtime is not recommended. It would require reallocation of memory, which is pretty slow. Resetting the device would likely slow the application down a bit, so I'd say it wouldn't provide smooth resizing.

If you're looking for smooth resizes, I'd recommend you create a buffer big enough for the window's max size, and only use a portion of it when rendering. This would waste a bit of memory, but would provide smooth rendering through resizing.

The Present call can accept two RECTs for the source and destination areas. These can be used to only use a portion of the backbuffer.

Hope this helps.

Share this post


Link to post
Share on other sites
Thats typically why games do not allow you to resize. I would recommend not allowing resizing at all. However, you should allow the player to fullscreen. In which case, you would need to recreate the device and textures. In this case, a gross slow-down (2-3 seconds, depending on how many/much textures you need to reload) is fine.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!