Microsoft.Xna.Framework
Class GraphicsDeviceManager

java.lang.Object
  extended by Microsoft.Xna.Framework.GraphicsDeviceManager
All Implemented Interfaces:
IGraphicsDeviceManager, IGraphicsDeviceService, System.IDisposable

public class GraphicsDeviceManager
extends java.lang.Object
implements IGraphicsDeviceService, System.IDisposable, IGraphicsDeviceManager

Handles the configuration and management of the graphics device.

Author:
Halofreak1990

Field Summary
 int BackBufferHeight
           
 int BackBufferWidth
           
static int DefaultBackBufferHeight
          Specifies the default minimum back-buffer height.
static int DefaultBackBufferWidth
          Specifies the default minimum back-buffer width.
 Microsoft.Xna.Framework.Graphics.DepthFormat DepthStencilFormat
           
 System.Event<System.EventArgs> Disposed
           
 boolean IsFullScreen
           
 Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumPixelShaderProfile
           
 Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumVertexShaderProfile
           
 boolean PreferMultiSampling
           
 Microsoft.Xna.Framework.Graphics.SurfaceFormat PreferredBackBufferFormat
           
 boolean SynchronizeWithVerticalRetrace
           
static Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidAdapterFormats
           
static Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidBackBufferFormats
           
static Microsoft.Xna.Framework.Graphics.DeviceType[] ValidDeviceTypes
           
 
Fields inherited from interface Microsoft.Xna.Framework.IGraphicsDeviceService
DeviceCreated, DeviceDisposing, DeviceReset, DeviceResetting
 
Constructor Summary
GraphicsDeviceManager(Game game)
          Creates a new GraphicsDeviceManager and registers it to handle the configuration and management of the graphics device for the specified Game.
 
Method Summary
 void ApplyChanges()
          Applies any changes to device-related properties, changing the graphics device as necessary.
 boolean BeginDraw()
           
 void CreateDevice()
          Called to ensure that the device manager has created a valid device.
 void Dispose()
           
 void EndDraw()
           
 Microsoft.Xna.Framework.Graphics.GraphicsDevice getGraphicsDevice()
          Retrieves a GraphicsDevice.
 Microsoft.Xna.Framework.Graphics.GraphicsProfile getGraphicsProfile()
           
 void setGraphicsProfile(Microsoft.Xna.Framework.Graphics.GraphicsProfile value)
           
 void ToggleFullScreen()
          Toggles between full screen and windowed mode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultBackBufferWidth

public static final int DefaultBackBufferWidth
Specifies the default minimum back-buffer width.

See Also:
Constant Field Values

DefaultBackBufferHeight

public static final int DefaultBackBufferHeight
Specifies the default minimum back-buffer height.

See Also:
Constant Field Values

ValidAdapterFormats

public static final Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidAdapterFormats

ValidBackBufferFormats

public static final Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidBackBufferFormats

ValidDeviceTypes

public static final Microsoft.Xna.Framework.Graphics.DeviceType[] ValidDeviceTypes

MinimumPixelShaderProfile

public Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumPixelShaderProfile

MinimumVertexShaderProfile

public Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumVertexShaderProfile

PreferMultiSampling

public boolean PreferMultiSampling

PreferredBackBufferFormat

public Microsoft.Xna.Framework.Graphics.SurfaceFormat PreferredBackBufferFormat

BackBufferHeight

public int BackBufferHeight

BackBufferWidth

public int BackBufferWidth

SynchronizeWithVerticalRetrace

public boolean SynchronizeWithVerticalRetrace

IsFullScreen

public boolean IsFullScreen

DepthStencilFormat

public Microsoft.Xna.Framework.Graphics.DepthFormat DepthStencilFormat

Disposed

public final System.Event<System.EventArgs> Disposed
Constructor Detail

GraphicsDeviceManager

public GraphicsDeviceManager(Game game)
Creates a new GraphicsDeviceManager and registers it to handle the configuration and management of the graphics device for the specified Game.

Parameters:
game - Game the GraphicsDeviceManager should be associated with.
Method Detail

getGraphicsDevice

public Microsoft.Xna.Framework.Graphics.GraphicsDevice getGraphicsDevice()
Description copied from interface: IGraphicsDeviceService
Retrieves a GraphicsDevice.

Specified by:
getGraphicsDevice in interface IGraphicsDeviceService

getGraphicsProfile

public Microsoft.Xna.Framework.Graphics.GraphicsProfile getGraphicsProfile()

setGraphicsProfile

public void setGraphicsProfile(Microsoft.Xna.Framework.Graphics.GraphicsProfile value)

ApplyChanges

public void ApplyChanges()
Applies any changes to device-related properties, changing the graphics device as necessary.


BeginDraw

public boolean BeginDraw()
Specified by:
BeginDraw in interface IGraphicsDeviceManager

CreateDevice

public void CreateDevice()
Called to ensure that the device manager has created a valid device.

Specified by:
CreateDevice in interface IGraphicsDeviceManager

Dispose

public void Dispose()
Specified by:
Dispose in interface System.IDisposable

EndDraw

public void EndDraw()
Specified by:
EndDraw in interface IGraphicsDeviceManager

ToggleFullScreen

public void ToggleFullScreen()
Toggles between full screen and windowed mode.