GraphicsDeviceManager Class (Microsoft.Xna.Framework)
Used to initialize and control the presentation of the graphics device.
- 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 |
||
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
|
||
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().) | ||
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. |
Platforms | Name | Description | |
---|---|---|---|
DeviceCreated | (Implements IGraphicsDeviceService.DeviceCreated().) | ||
DeviceDisposing | (Implements IGraphicsDeviceService.DeviceDisposing().) | ||
DeviceReset | (Implements IGraphicsDeviceService.DeviceReset().) | ||
DeviceResetting | (Implements IGraphicsDeviceService.DeviceResetting().) | ||
Disposed | |||
PreparingDeviceSettings |
Supported in:
Windows DirectX Desktop
Linux Desktop
Windows OpenGL Desktop
Web
Windows DirectX Desktop
Linux Desktop
Windows OpenGL Desktop
Web