C# Класс Fusion.Drivers.Graphics.GraphicsDevice

Наследование: System.DisposableBase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Game Game

Private Properties

Свойство Тип Описание
Initialize void
NotifyViewportChanges void
Present void

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
Initialize ( GraphicsParameters parameters ) : void

Initializes graphics device

NotifyViewportChanges ( ) : void

Present ( int syncInterval ) : void

Описание методов

ApplyGpuState() публичный Метод

Applies all GPU states before draw, dispatch or clear. Method assumes that deviceContext is already locked.
public ApplyGpuState ( ) : void
Результат void

Clear() публичный Метод

Clear depth stencil surface
public Clear ( DepthStencilSurface surface, float depth = 1, byte stencil ) : void
surface DepthStencilSurface
depth float
stencil byte
Результат void

Clear() публичный Метод

Clears render target using given color
public Clear ( RenderTargetSurface surface, Color4 color ) : void
surface RenderTargetSurface
color Color4
Результат void

Clear() публичный Метод

Fills structured buffer with given values
public Clear ( StructuredBuffer buffer, Int4 values ) : void
buffer StructuredBuffer
values Int4
Результат void

ClearBackbuffer() публичный Метод

public ClearBackbuffer ( Color4 color, float depth = 1, byte stencil ) : void
color Color4
depth float
stencil byte
Результат void

Dispatch() публичный Метод

public Dispatch ( int threadGroupCountX, int threadGroupCountY = 1, int threadGroupCountZ = 1 ) : void
threadGroupCountX int
threadGroupCountY int
threadGroupCountZ int
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

Draw() публичный Метод

Draws primitives.
public Draw ( int vertexCount, int firstIndex ) : void
vertexCount int
firstIndex int
Результат void

DrawAuto() публичный Метод

public DrawAuto ( ) : void
Результат void

DrawIndexed() публичный Метод

public DrawIndexed ( int indexCount, int firstIndex, int baseVertexOffset ) : void
indexCount int
firstIndex int
baseVertexOffset int
Результат void

DrawInstanced() публичный Метод

public DrawInstanced ( int vertexCountPerInstance, int instanceCount, int startVertexLocation, int startInstanceLocation ) : void
vertexCountPerInstance int
instanceCount int
startVertexLocation int
startInstanceLocation int
Результат void

DrawInstancedIndexed() публичный Метод

public DrawInstancedIndexed ( int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation ) : void
indexCountPerInstance int
instanceCount int
startIndexLocation int
baseVertexLocation int
startInstanceLocation int
Результат void

GetTargets() публичный Метод

public GetTargets ( DepthStencilSurface &depthStencil, RenderTargetSurface &renderTargets ) : void
depthStencil DepthStencilSurface
renderTargets RenderTargetSurface
Результат void

GraphicsDevice() публичный Метод

public GraphicsDevice ( Game game ) : System
game Game
Результат System

ResetStates() публичный Метод

Resets all devices states including RTs and DS
public ResetStates ( ) : void
Результат void

Resolve() публичный Метод

public Resolve ( RenderTarget2D source, RenderTarget2D destination ) : void
source RenderTarget2D
destination RenderTarget2D
Результат void

Resolve() публичный Метод

public Resolve ( RenderTargetSurface source, RenderTargetSurface destination ) : void
source RenderTargetSurface
destination RenderTargetSurface
Результат void

RestoreBackbuffer() публичный Метод

public RestoreBackbuffer ( ) : void
Результат void

Screenshot() публичный Метод

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
Результат void

SetCSRWBuffer() публичный Метод

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.
Результат void

SetCSRWTexture() публичный Метод

SetCSRWBuffer & SetCSRWTexture share same registers.
public SetCSRWTexture ( int register, RenderTargetSurface surface ) : void
register int
surface RenderTargetSurface
Результат void

SetCSRWTexture() публичный Метод

public SetCSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void
register int
volumeTexture VolumeRWTexture
Результат void

SetPSRWBuffer() публичный Метод

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.
Результат void

SetPSRWTexture() публичный Метод

SetPSRWBuffer & SetPSRWTexture share same registers.
public SetPSRWTexture ( int register, RenderTargetSurface surface ) : void
register int
surface RenderTargetSurface
Результат void

SetPSRWTexture() публичный Метод

public SetPSRWTexture ( int register, VolumeRWTexture volumeTexture ) : void
register int
volumeTexture VolumeRWTexture
Результат void

SetTargets() публичный Метод

Analogue of SetTargets( depthStencil.Surface, renderTarget.Surface )
public SetTargets ( DepthStencil2D depthStencil, RenderTarget2D renderTarget ) : void
depthStencil DepthStencil2D
renderTarget RenderTarget2D
Результат void

SetTargets() публичный Метод

Sets targets.
public SetTargets ( DepthStencilSurface depthStencil ) : void
depthStencil DepthStencilSurface
Результат void

SetViewport() публичный Метод

public SetViewport ( Viewport viewport ) : void
viewport Viewport
Результат void

SetViewport() публичный Метод

public SetViewport ( ViewportF viewport ) : void
viewport ViewportF
Результат void

SetViewport() публичный Метод

public SetViewport ( int x, int y, int w, int h ) : void
x int
y int
w int
h int
Результат void

SetupVertexInput() публичный Метод

Sets index and vertex buffer.
public SetupVertexInput ( VertexBuffer vertexBuffer, IndexBuffer indexBuffer ) : void
vertexBuffer VertexBuffer Vertex buffer to apply
indexBuffer IndexBuffer Index buffer to apply.
Результат void

SetupVertexInput() публичный Метод

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.
Результат void

SetupVertexOutput() публичный Метод

public SetupVertexOutput ( VertexBuffer vertexBuffer, int offset ) : void
vertexBuffer VertexBuffer
offset int
Результат void

Описание свойств

Game публичное свойство

Game
public Game Game
Результат Game