Microsoft.Xna.Framework.Graphics
Class GraphicsDevice

java.lang.Object
  extended by Microsoft.Xna.Framework.Graphics.GraphicsDevice
All Implemented Interfaces:
IDisposable

public class GraphicsDevice
extends java.lang.Object
implements IDisposable

Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders.

Author:
Halofreak1990

Field Summary
 Event<EventArgs> DeviceLost
           
 Event<EventArgs> DeviceReset
           
 Event<EventArgs> DeviceResetting
           
 Event<EventArgs> Disposing
           
 Event<ResourceCreatedEventArgs> ResourceCreated
           
 Event<ResourceDestroyedEventArgs> ResourceDestroyed
           
 
Constructor Summary
GraphicsDevice(GraphicsAdapter adapter, GraphicsProfile profile, PresentationParameters presentationParameters)
           
 
Method Summary
 void Clear(Color color)
           
 void Clear(java.util.EnumSet<ClearOptions> options, Color color, float depth, int stencil)
           
 void Clear(java.util.EnumSet<ClearOptions> options, Vector4 color, float depth, int stencil)
           
 void Dispose()
          Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected  void Dispose(boolean disposing)
           
 GraphicsAdapter getAdapter()
           
<T> void
GetBackBufferData(Rectangle rect, T[] data, int startIndex, int elementCount)
           
<T> void
GetBackBufferData(T[] data)
           
<T> void
GetBackBufferData(T[] data, int startIndex, int elementCount)
           
 Color getBlendFactor()
           
 GraphicsProfile getGraphicsProfile()
           
 PresentationParameters getPresentationParameters()
          Gets the presentation parameters associated with this graphics device.
 TextureCollection getTextures()
           
 Viewport getViewport()
           
 void Present()
           
 void Reset()
           
 void Reset(PresentationParameters presentationParameters)
           
 void Reset(PresentationParameters presentationParameters, GraphicsAdapter adapter)
           
 void setBlendFactor(Color value)
           
 void SetRenderTarget(RenderTarget2D renderTarget)
           
 void SetRenderTarget(RenderTargetCube renderTarget, CubeMapFace cubeMapFace)
           
 void SetRenderTargets(RenderTargetBinding... renderTargets)
           
 void SetVertexBuffer(VertexBuffer vertexBuffer)
          Sets or binds a vertex buffer to the device.
 void SetVertexBuffer(VertexBuffer vertexBuffer, int vertexOffset)
           
 void setViewport(Viewport value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DeviceLost

public final Event<EventArgs> DeviceLost

DeviceReset

public final Event<EventArgs> DeviceReset

DeviceResetting

public final Event<EventArgs> DeviceResetting

Disposing

public final Event<EventArgs> Disposing

ResourceCreated

public final Event<ResourceCreatedEventArgs> ResourceCreated

ResourceDestroyed

public final Event<ResourceDestroyedEventArgs> ResourceDestroyed
Constructor Detail

GraphicsDevice

public GraphicsDevice(GraphicsAdapter adapter,
                      GraphicsProfile profile,
                      PresentationParameters presentationParameters)
Parameters:
adapter -
profile -
presentationParameters -
Throws:
ArgumentNullException
Method Detail

getAdapter

public GraphicsAdapter getAdapter()

getBlendFactor

public Color getBlendFactor()

setBlendFactor

public void setBlendFactor(Color value)
Parameters:
value -

getGraphicsProfile

public GraphicsProfile getGraphicsProfile()

getPresentationParameters

public PresentationParameters getPresentationParameters()
Gets the presentation parameters associated with this graphics device.


getTextures

public TextureCollection getTextures()
Returns:

getViewport

public Viewport getViewport()
Returns:

setViewport

public void setViewport(Viewport value)
Parameters:
value -

Clear

public void Clear(Color color)
Parameters:
color -

Clear

public void Clear(java.util.EnumSet<ClearOptions> options,
                  Color color,
                  float depth,
                  int stencil)
Parameters:
options -
color -
depth -
stencil -

Clear

public void Clear(java.util.EnumSet<ClearOptions> options,
                  Vector4 color,
                  float depth,
                  int stencil)
Parameters:
options -
color -
depth -
stencil -

Dispose

public final void Dispose()
Description copied from interface: IDisposable
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Specified by:
Dispose in interface IDisposable

Dispose

protected void Dispose(boolean disposing)
Parameters:
disposing -

GetBackBufferData

public <T> void GetBackBufferData(T[] data)
Type Parameters:
T -
Parameters:
data -

GetBackBufferData

public <T> void GetBackBufferData(T[] data,
                                  int startIndex,
                                  int elementCount)
Type Parameters:
T -
Parameters:
data -
startIndex -
elementCount -

GetBackBufferData

public <T> void GetBackBufferData(Rectangle rect,
                                  T[] data,
                                  int startIndex,
                                  int elementCount)
Type Parameters:
T -
Parameters:
rect -
data -
startIndex -
elementCount -

Present

public void Present()

Reset

public void Reset()

Reset

public void Reset(PresentationParameters presentationParameters)
Parameters:
presentationParameters -

Reset

public void Reset(PresentationParameters presentationParameters,
                  GraphicsAdapter adapter)
Parameters:
presentationParameters -
adapter -

SetRenderTarget

public void SetRenderTarget(RenderTarget2D renderTarget)
Parameters:
renderTarget -

SetRenderTarget

public void SetRenderTarget(RenderTargetCube renderTarget,
                            CubeMapFace cubeMapFace)
Parameters:
renderTarget -
cubeMapFace -

SetRenderTargets

public void SetRenderTargets(RenderTargetBinding... renderTargets)
Parameters:
renderTargets -

SetVertexBuffer

public void SetVertexBuffer(VertexBuffer vertexBuffer)
Sets or binds a vertex buffer to the device.

Parameters:
vertexBuffer - A vertex buffer.

SetVertexBuffer

public void SetVertexBuffer(VertexBuffer vertexBuffer,
                            int vertexOffset)
Parameters:
vertexBuffer -
vertexOffset -