locked
Viewport Height and Width RRS feed

  • Question

  • OK so I'm very new to XNA and I'm just trying to understand something which I'm sure is very simple.

    I've created a Viewport variable(don't know if thats the right term for it) and am trying to use that to get the value for the height and width of the viewport using using variableName.Height or .Width but for some reason this value is always 0. Could anybody tell me why this is being read as zero and not the actual viewport width or height?

    Thanks for the help.
    Thursday, December 21, 2006 10:47 PM

Answers

  • To get the dimension of the currently active viewport you have to query your graphic device. The property “Viewport” contains what you want.

    Sunday, December 24, 2006 10:45 AM