GraphicsDeviceManager Class (Microsoft.Xna.Framework)

Used to initialize and control the presentation of the graphics device.
System.Object
   Microsoft.Xna.Framework.GraphicsDeviceManager

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public class GraphicsDeviceManager : IGraphicsDeviceService, IDisposable, IGraphicsDeviceManager

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The GraphicsDeviceManager type exposes the following members.

  Platforms Name Description
GraphicsDeviceManager Associates this graphics device manager to a game instances. 
Top
  Platforms Name Description
DefaultBackBufferHeight The default back buffer height. 
DefaultBackBufferWidth The default back buffer width. 
Top
  Platforms Name Description
GraphicsDevice Returns the graphics device for this manager. (Implements IGraphicsDeviceService.GraphicsDevice().)
GraphicsProfile The profile which determines the graphics feature level. 
HardwareModeSwitch Gets or sets the boolean which defines how window switches from windowed to fullscreen state. "Hard" mode(true) is slow to switch, but more effecient for performance, while "soft" mode(false) is vice versa. The default value is true
IsFullScreen Indicates the desire to switch into fullscreen mode. 
PreferHalfPixelOffset Indicates if DX9 style pixel addressing or current standard pixel addressing should be used. This flag is set to false by default. It should be set to true for XNA compatibility. It is recommended to leave this flag set to false for projects that are not ported from XNA. This value is passed to UseHalfPixelOffset
PreferMultiSampling Indicates the desire for a multisampled back buffer. 
PreferredBackBufferFormat Indicates the desired back buffer color format. 
PreferredBackBufferHeight Indicates the desired back buffer height in pixels. 
PreferredBackBufferWidth Indicates the desired back buffer width in pixels. 
PreferredDepthStencilFormat Indicates the desired depth-stencil buffer format. 
SupportedOrientations Indicates the desired allowable display orientations when the device is rotated. 
SynchronizeWithVerticalRetrace Indicates the desire for vsync when presenting the back buffer. 
Top
  Platforms Name Description
ApplyChanges Applies any pending property changes to the graphics device. 
BeginDraw Called at the start of rendering a frame. (Implements IGraphicsDeviceManager.BeginDraw().)
Dispose()  (Implements IDisposable.Dispose().)
Dispose(bool)  
EndDraw Called after rendering to present the frame to the screen. (Implements IGraphicsDeviceManager.EndDraw().)
Finalize  (Overrides object.Finalize().)
OnDeviceDisposing  
OnDeviceResetting  
ToggleFullScreen Toggles between windowed and fullscreen modes. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web