GraphicsDeviceManager Class (Microsoft.Xna.Framework)

Used to initialize and control the presentation of the graphics device.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • 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. 
  Platforms Name Description
DefaultBackBufferHeight The default back buffer height. 
DefaultBackBufferWidth The default back buffer width. 
  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. 
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. 
  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().)
EndDraw Called after rendering to present the frame to the screen. (Implements IGraphicsDeviceManager.EndDraw().)
Finalize  (Overrides object.Finalize().)
ToggleFullScreen Toggles between windowed and fullscreen modes. 
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop