Microsoft Game Technologies: XNA Screen Resolution Problems

  • dusda / 100 / Sat, 30 Jan 2010 19:43:00 GMT / Comments (2)
  • I'm finishing up porting my game, Theta Wars (there's a short video of it on YouTube if anyone's interested, I'd link it but my university blocks it here), which thankfully has taken only about three hours. Everything works, but there's one problem: the screen resolution. I have my BackBuffer width and height set to 1280x720, respectively. I understand that the ClientBounds properties determine the actual window borders of the form (I read through the Displays and ViewPorts portion of the documentation), but I don't understand how to modify them.

    Therefore, only a portion of my actual drawn screen is visible (around 400x300, I'm guessing). How do I fix this?

  • Keywords:

    xna, screen, resolution, problems, microsoft, game

  • http://msdn.itags.org/microsoft-game/244680/«« Last Thread - Next Thread »»
    1. Ah, figured it out. Apparently using the GraphicsDevice.PresentationParameters.BackBufferWidth and Height properties is a bad idea. I switched to using the graphics.PreferredBackBufferWidth and Height properties, and it works. I wonder, why the former doesn't cascade properly to the ClientBounds?

      dusda | Mon, 03 Sep 2007 21:47:00 GMT |

    2. I have been playing around with XNA on my 360, but here is a nice little snip of what I've been using to make sure the resolution/buffer was what I wanted

      graphics.IsFullScreen = true;
      graphics.PreferredBackBufferHeight = graphics.GraphicsDevice.DisplayMode.Height;
      graphics.PreferredBackBufferWidth = graphics.GraphicsDevice.DisplayMode.Width;
      graphics.ApplyChanges();

      I know its not exactly what you were looking for, but it might stimulate something.

      reapazor | Mon, 03 Sep 2007 21:48:00 GMT |