Jump to content
  • Advertisement
Sign in to follow this  
captain_crunch

ViewPort.Width differs from screenshot

This topic is 842 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 problem in my XNA game. When I set PreferredBackBuffer size (windowed mode) and watch the GrahpicsDevice.ViewPort.Width after applying the changes, the Width property says 800 as I want it to. But then when I take a screenshot of either the window or the whole desktop, the window is actually 200 pixels wider, around 1000 pixels. The height also differs.

 

I checked the Window.ClientBounds and the PresentationParameters.BackBufferWidth and they are also 800 in width.

 

What is the reason for this? It confuses me a lot and makes it very difficult to debug the UI rendering. Also, some of the sprites which are supposed to be rendered 1-to-1 appear to have been scaled slightly larger.

I am running the game on a notebook pc.

Edited by captain_crunch

Share this post


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