GetViewport
Introduction
The GetViewport method can be used to get a reference to the current Microsoft.Xna.Framework.Graphics.Viewport with the calling Camera's properties applied.
GetViewport returns a reference to the current Viewport
The GetViewport method does the following:
It first grabs the GraphicsDevice's Viewport
It sets the Viewport's X, Y, Width, and Height
It returns the reference to the GraphicsDevice's Viewport
Therefore, if you call GetViewport on two different Cameras, you will have the same Viewport:
Last updated
Was this helpful?