Jump to content
  • Advertisement
Sign in to follow this  

ViewPort.Width differs from screenshot

This topic is 990 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
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!