C# Class Fusion.Drivers.Graphics.GraphicsDevice

Inheritance: System.DisposableBase
Afficher le fichier Open project: demiurghg/FusionEngine Class Usage Examples

Méthodes publiques

Свойство Type Description
Game Game

Private Properties

Свойство Type Description
Initialize void
NotifyViewportChanges void
Present void

Méthodes publiques

Méthode Description
ApplyGpuState ( ) : void

Applies all GPU states before draw, dispatch or clear. Method assumes that deviceContext is already locked.

Clear ( DepthStencilSurface surface, float depth = 1, byte stencil ) : void

Clear depth stencil surface

Clear ( RenderTargetSurface surface, Color4 color ) : void

Clears render target using given color

Clear ( StructuredBuffer buffer, Int4 values ) : void

Fills structured buffer with given values

ClearBackbuffer ( Color4 color, float depth = 1, byte stencil ) : void

Dispatch ( int threadGroupCountX, int threadGroupCountY = 1, int threadGroupCountZ = 1 ) : void

Draw ( int vertexCount, int firstIndex ) : void

Draws primitives.

DrawAuto ( ) : void

DrawIndexed ( int indexCount, int firstIndex, int baseVertexOffset ) : void

DrawInstanced ( int vertexCountPerInstance, int instanceCount, int startVertexLocation, int startInstanceLocation ) : void

DrawInstancedIndexed ( int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation ) : void

GetTargets ( DepthStencilSurface &depthStencil, RenderTargetSurface &renderTargets ) : void

GraphicsDevice ( Game game ) : System

ResetStates ( ) : void

Resets all devices states including RTs and DS

Resolve ( RenderTarget2D source, RenderTarget2D destination ) : void

Resolve ( RenderTargetSurface source, RenderTargetSurface destination ) : void

RestoreBackbuffer ( ) : void

Screenshot ( string path = null ) : void

Makes screenshot and saves image at specified path. If path is null image will be stored at MyPicures\AppName\Shot-CurrentDate.bmp

SetCSRWBuffer ( int register, StructuredBuffer buffer, int initialCount = -1 ) : void

SetCSRWTexture ( int register, RenderTargetSurface surface ) : void

SetCSRWBuffer & SetCSRWTexture share same registers.

SetCSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void

SetPSRWBuffer ( int register, StructuredBuffer buffer, int initialCount = -1 ) : void

SetPSRWTexture ( int register, RenderTargetSurface surface ) : void

SetPSRWBuffer & SetPSRWTexture share same registers.

SetPSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void

SetTargets ( DepthStencil2D depthStencil, RenderTarget2D renderTarget ) : void

Analogue of SetTargets( depthStencil.Surface, renderTarget.Surface )

SetTargets ( DepthStencilSurface depthStencil ) : void

Sets targets.

SetViewport ( Viewport viewport ) : void

SetViewport ( ViewportF viewport ) : void

SetViewport ( int x, int y, int w, int h ) : void

SetupVertexInput ( VertexBuffer vertexBuffer, IndexBuffer indexBuffer ) : void

Sets index and vertex buffer.

SetupVertexInput ( VertexBuffer vertexBuffers, int offsets, IndexBuffer indexBuffer ) : void

Sets index and vertex buffers.

SetupVertexOutput ( VertexBuffer vertexBuffer, int offset ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
Initialize ( GraphicsParameters parameters ) : void

Initializes graphics device

NotifyViewportChanges ( ) : void

Present ( int syncInterval ) : void

Method Details

ApplyGpuState() public méthode

Applies all GPU states before draw, dispatch or clear. Method assumes that deviceContext is already locked.
public ApplyGpuState ( ) : void
Résultat void

Clear() public méthode

Clear depth stencil surface
public Clear ( DepthStencilSurface surface, float depth = 1, byte stencil ) : void
surface DepthStencilSurface
depth float
stencil byte
Résultat void

Clear() public méthode

Clears render target using given color
public Clear ( RenderTargetSurface surface, Color4 color ) : void
surface RenderTargetSurface
color Color4
Résultat void

Clear() public méthode

Fills structured buffer with given values
public Clear ( StructuredBuffer buffer, Int4 values ) : void
buffer StructuredBuffer
values Int4
Résultat void

ClearBackbuffer() public méthode

public ClearBackbuffer ( Color4 color, float depth = 1, byte stencil ) : void
color Color4
depth float
stencil byte
Résultat void

Dispatch() public méthode

public Dispatch ( int threadGroupCountX, int threadGroupCountY = 1, int threadGroupCountZ = 1 ) : void
threadGroupCountX int
threadGroupCountY int
threadGroupCountZ int
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Draw() public méthode

Draws primitives.
public Draw ( int vertexCount, int firstIndex ) : void
vertexCount int
firstIndex int
Résultat void

DrawAuto() public méthode

public DrawAuto ( ) : void
Résultat void

DrawIndexed() public méthode

public DrawIndexed ( int indexCount, int firstIndex, int baseVertexOffset ) : void
indexCount int
firstIndex int
baseVertexOffset int
Résultat void

DrawInstanced() public méthode

public DrawInstanced ( int vertexCountPerInstance, int instanceCount, int startVertexLocation, int startInstanceLocation ) : void
vertexCountPerInstance int
instanceCount int
startVertexLocation int
startInstanceLocation int
Résultat void

DrawInstancedIndexed() public méthode

public DrawInstancedIndexed ( int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation ) : void
indexCountPerInstance int
instanceCount int
startIndexLocation int
baseVertexLocation int
startInstanceLocation int
Résultat void

GetTargets() public méthode

public GetTargets ( DepthStencilSurface &depthStencil, RenderTargetSurface &renderTargets ) : void
depthStencil DepthStencilSurface
renderTargets RenderTargetSurface
Résultat void

GraphicsDevice() public méthode

public GraphicsDevice ( Game game ) : System
game Game
Résultat System

ResetStates() public méthode

Resets all devices states including RTs and DS
public ResetStates ( ) : void
Résultat void

Resolve() public méthode

public Resolve ( RenderTarget2D source, RenderTarget2D destination ) : void
source RenderTarget2D
destination RenderTarget2D
Résultat void

Resolve() public méthode

public Resolve ( RenderTargetSurface source, RenderTargetSurface destination ) : void
source RenderTargetSurface
destination RenderTargetSurface
Résultat void

RestoreBackbuffer() public méthode

public RestoreBackbuffer ( ) : void
Résultat void

Screenshot() public méthode

Makes screenshot and saves image at specified path. If path is null image will be stored at MyPicures\AppName\Shot-CurrentDate.bmp
public Screenshot ( string path = null ) : void
path string
Résultat void

SetCSRWBuffer() public méthode

public SetCSRWBuffer ( int register, StructuredBuffer buffer, int initialCount = -1 ) : void
register int
buffer StructuredBuffer
initialCount int An array of append and consume buffer offsets. /// A value of -1 indicates to keep the current offset. /// Any other values set the hidden counter for that appendable and consumable UAV.
Résultat void

SetCSRWTexture() public méthode

SetCSRWBuffer & SetCSRWTexture share same registers.
public SetCSRWTexture ( int register, RenderTargetSurface surface ) : void
register int
surface RenderTargetSurface
Résultat void

SetCSRWTexture() public méthode

public SetCSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void
register int
volumeTexture VolumeRWTexture
Résultat void

SetPSRWBuffer() public méthode

public SetPSRWBuffer ( int register, StructuredBuffer buffer, int initialCount = -1 ) : void
register int
buffer StructuredBuffer
initialCount int An array of append and consume buffer offsets. /// A value of -1 indicates to keep the current offset. /// Any other values set the hidden counter for that appendable and consumable UAV.
Résultat void

SetPSRWTexture() public méthode

SetPSRWBuffer & SetPSRWTexture share same registers.
public SetPSRWTexture ( int register, RenderTargetSurface surface ) : void
register int
surface RenderTargetSurface
Résultat void

SetPSRWTexture() public méthode

public SetPSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void
register int
volumeTexture VolumeRWTexture
Résultat void

SetTargets() public méthode

Analogue of SetTargets( depthStencil.Surface, renderTarget.Surface )
public SetTargets ( DepthStencil2D depthStencil, RenderTarget2D renderTarget ) : void
depthStencil DepthStencil2D
renderTarget RenderTarget2D
Résultat void

SetTargets() public méthode

Sets targets.
public SetTargets ( DepthStencilSurface depthStencil ) : void
depthStencil DepthStencilSurface
Résultat void

SetViewport() public méthode

public SetViewport ( Viewport viewport ) : void
viewport Viewport
Résultat void

SetViewport() public méthode

public SetViewport ( ViewportF viewport ) : void
viewport ViewportF
Résultat void

SetViewport() public méthode

public SetViewport ( int x, int y, int w, int h ) : void
x int
y int
w int
h int
Résultat void

SetupVertexInput() public méthode

Sets index and vertex buffer.
public SetupVertexInput ( VertexBuffer vertexBuffer, IndexBuffer indexBuffer ) : void
vertexBuffer VertexBuffer Vertex buffer to apply
indexBuffer IndexBuffer Index buffer to apply.
Résultat void

SetupVertexInput() public méthode

Sets index and vertex buffers.
public SetupVertexInput ( VertexBuffer vertexBuffers, int offsets, IndexBuffer indexBuffer ) : void
vertexBuffers VertexBuffer Vertex buffers to apply. Provide null if no vertex buffers are required.
offsets int Offsets in each vertex buffer.
indexBuffer IndexBuffer Index buffers to apply.
Résultat void

SetupVertexOutput() public méthode

public SetupVertexOutput ( VertexBuffer vertexBuffer, int offset ) : void
vertexBuffer VertexBuffer
offset int
Résultat void

Property Details

Game public_oe property

Game
public Game Game
Résultat Game