public class GraphicsDeviceManager extends java.lang.Object implements IGraphicsDeviceService, System.IDisposable, IGraphicsDeviceManager
Modifier and Type | Field and Description |
---|---|
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> |
DeviceCreated |
System.Event<System.EventArgs> |
DeviceDisposing |
System.Event<System.EventArgs> |
DeviceReset |
System.Event<System.EventArgs> |
DeviceResetting |
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 |
System.Event<PreparingDeviceSettingsEventArgs> |
PreparingDeviceSettings |
boolean |
SynchronizeWithVerticalRetrace |
static Microsoft.Xna.Framework.Graphics.SurfaceFormat[] |
ValidAdapterFormats |
static Microsoft.Xna.Framework.Graphics.SurfaceFormat[] |
ValidBackBufferFormats |
static Microsoft.Xna.Framework.Graphics.DeviceType[] |
ValidDeviceTypes |
Constructor and Description |
---|
GraphicsDeviceManager(Game game)
Creates a new GraphicsDeviceManager and registers it to handle the configuration and management of the graphics device for the specified Game.
|
Modifier and Type | Method and Description |
---|---|
void |
ApplyChanges()
Applies any changes to device-related properties, changing the graphics device as necessary.
|
boolean |
BeginDraw() |
protected boolean |
CanResetDevice(GraphicsDeviceInformation newInfo) |
void |
CreateDevice()
Called to ensure that the device manager has created a valid device.
|
void |
Dispose() |
protected void |
Dispose(boolean disposing) |
void |
EndDraw() |
protected GraphicsDeviceInformation |
FindBestDevice(boolean anySuitableDevice) |
Microsoft.Xna.Framework.Graphics.GraphicsDevice |
getGraphicsDevice()
Retrieves a GraphicsDevice.
|
Microsoft.Xna.Framework.Graphics.GraphicsProfile |
getGraphicsProfile() |
protected void |
OnDeviceCreated(java.lang.Object sender,
System.EventArgs e)
Raises the DeviceCreated event.
|
protected void |
OnPreparingDeviceSettings(java.lang.Object sender,
PreparingDeviceSettingsEventArgs args)
Raises the PreparingDeviceSettings event.
|
protected void |
RankDevices(java.util.List<GraphicsDeviceInformation> foundDevices) |
void |
setGraphicsProfile(Microsoft.Xna.Framework.Graphics.GraphicsProfile value) |
void |
ToggleFullScreen()
Toggles between full screen and windowed mode.
|
public static final int DefaultBackBufferWidth
public static final int DefaultBackBufferHeight
public static final Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidAdapterFormats
public static final Microsoft.Xna.Framework.Graphics.SurfaceFormat[] ValidBackBufferFormats
public static final Microsoft.Xna.Framework.Graphics.DeviceType[] ValidDeviceTypes
public Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumPixelShaderProfile
public Microsoft.Xna.Framework.Graphics.ShaderProfile MinimumVertexShaderProfile
public boolean PreferMultiSampling
public Microsoft.Xna.Framework.Graphics.SurfaceFormat PreferredBackBufferFormat
public int BackBufferHeight
public int BackBufferWidth
public boolean SynchronizeWithVerticalRetrace
public boolean IsFullScreen
public Microsoft.Xna.Framework.Graphics.DepthFormat DepthStencilFormat
public final System.Event<System.EventArgs> DeviceCreated
public final System.Event<System.EventArgs> DeviceDisposing
public final System.Event<System.EventArgs> DeviceReset
public final System.Event<System.EventArgs> DeviceResetting
public final System.Event<System.EventArgs> Disposed
public final System.Event<PreparingDeviceSettingsEventArgs> PreparingDeviceSettings
public GraphicsDeviceManager(Game game)
game
- Game the GraphicsDeviceManager should be associated with.public Microsoft.Xna.Framework.Graphics.GraphicsDevice getGraphicsDevice()
IGraphicsDeviceService
getGraphicsDevice
in interface IGraphicsDeviceService
public Microsoft.Xna.Framework.Graphics.GraphicsProfile getGraphicsProfile()
public void setGraphicsProfile(Microsoft.Xna.Framework.Graphics.GraphicsProfile value)
value
- public void ApplyChanges()
public boolean BeginDraw()
BeginDraw
in interface IGraphicsDeviceManager
protected boolean CanResetDevice(GraphicsDeviceInformation newInfo)
newInfo
- public void CreateDevice()
CreateDevice
in interface IGraphicsDeviceManager
public void Dispose()
Dispose
in interface System.IDisposable
protected void Dispose(boolean disposing)
disposing
- public void EndDraw()
EndDraw
in interface IGraphicsDeviceManager
protected GraphicsDeviceInformation FindBestDevice(boolean anySuitableDevice)
anySuitableDevice
- protected void OnDeviceCreated(java.lang.Object sender, System.EventArgs e)
sender
- e
- protected void OnPreparingDeviceSettings(java.lang.Object sender, PreparingDeviceSettingsEventArgs args)
sender
- args
- protected void RankDevices(java.util.List<GraphicsDeviceInformation> foundDevices)
public void ToggleFullScreen()