Jump to content
  • Advertisement
Sign in to follow this  
shavais

How can I castrate window-resize?

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

I have a very simple scene (which has a triangle and a sprite) being rendered in an XNA app, and another similar one being rendered in a C#/MDX app. In both cases, the scene resizes if the user resizes the window. Is there a way to allow the user to resize the window to their heart's content without effecting the size of the rendering? Maybe changing the viewport size in OnSizeChanged().. am I on the right track? Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
Erm. Castrate?

Anyways, it depends on what exactly you're trying to have happen. When the user makes the window bigger, should the rendered area have a black border around it? When the user makes the window smaller, should the effective field of view be very small?

Share this post


Link to post
Share on other sites
Yeah it should work if you just adjust the viewport to be the size of the client area. Just make sure you initially set the backbuffer to be big enough to handle when the window is maximized.

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!