Class D3D11DeviceContext
Represents a device context which generates rendering commands.
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public sealed class D3D11DeviceContext : D3D11DeviceChild, IDisposable, ID3D11Releasable
Properties
| Edit this page View SourceContextOptions
Gets the initialization flags associated with the current deferred context.
Declaration
public uint ContextOptions { get; }
Property Value
Type | Description |
---|---|
uint |
ContextType
Gets the type of device context.
Declaration
public D3D11DeviceContextType ContextType { get; }
Property Value
Type | Description |
---|---|
D3D11DeviceContextType |
Handle
Gets an handle representing the D3D11 object interface.
Declaration
public override object Handle { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
Methods
| Edit this page View SourceBegin(D3D11Asynchronous)
Mark the beginning of a series of commands.
Declaration
public void Begin(D3D11Asynchronous async)
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface. |
ClearDepthStencilView(D3D11DepthStencilView, D3D11ClearOptions, float, byte)
Clears the depth-stencil resource.
Declaration
public void ClearDepthStencilView(D3D11DepthStencilView depthStencilView, D3D11ClearOptions clearOptions, float depth, byte stencil)
Parameters
Type | Name | Description |
---|---|---|
D3D11DepthStencilView | depthStencilView | The depth stencil to be cleared. |
D3D11ClearOptions | clearOptions | Identify the type of data to clear. |
float | depth | Clear the depth buffer with this value. This value will be clamped between 0 and 1. |
byte | stencil | Clear the stencil buffer with this value. |
ClearRenderTargetView(D3D11RenderTargetView, float[])
Set all the elements in a render target to one value.
Declaration
public void ClearRenderTargetView(D3D11RenderTargetView renderTargetView, float[] colorRgba)
Parameters
Type | Name | Description |
---|---|---|
D3D11RenderTargetView | renderTargetView | The render target. |
float[] | colorRgba | A 4-component array that represents the color to fill the render target with. |
ClearState()
Restore all default settings.
Declaration
public void ClearState()
ClearUnorderedAccessViewFloat(D3D11UnorderedAccessView, float[])
Clears an unordered access resource with a float value.
Declaration
public void ClearUnorderedAccessViewFloat(D3D11UnorderedAccessView unorderedAccessView, float[] values)
Parameters
Type | Name | Description |
---|---|---|
D3D11UnorderedAccessView | unorderedAccessView | The unordered access resource to clear. |
float[] | values | Values to copy to corresponding channels. |
ClearUnorderedAccessViewUInt(D3D11UnorderedAccessView, uint[])
Clears an unordered access resource with bit-precise values.
Declaration
public void ClearUnorderedAccessViewUInt(D3D11UnorderedAccessView unorderedAccessView, uint[] values)
Parameters
Type | Name | Description |
---|---|---|
D3D11UnorderedAccessView | unorderedAccessView | The unordered access resource to clear. |
uint[] | values | Values to copy to corresponding channels. |
ComputeShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the compute shader stage.
Declaration
public D3D11Buffer[] ComputeShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned by the method. |
ComputeShaderGetSamplers(uint, uint)
Get an array of sampler state interfaces from the compute shader stage.
Declaration
public D3D11SamplerState[] ComputeShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | An array of sampler-state interfaces. |
ComputeShaderGetShader()
Get the compute shader currently set on the device.
Declaration
public D3D11ComputeShader ComputeShaderGetShader()
Returns
Type | Description |
---|---|
D3D11ComputeShader | A compute shader. |
ComputeShaderGetShader(uint, out D3D11ClassInstance[])
Get the compute shader currently set on the device.
Declaration
public D3D11ComputeShader ComputeShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11ComputeShader | A compute shader. |
ComputeShaderGetShaderResources(uint, uint)
Get the compute shader resources.
Declaration
public D3D11ShaderResourceView[] ComputeShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
ComputeShaderGetUnorderedAccessViews(uint, uint)
Gets an array of views for an unordered resource.
Declaration
public D3D11UnorderedAccessView[] ComputeShaderGetUnorderedAccessViews(uint startSlot, uint numUnorderedAccessViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index of the first element in the zero-based array to return. |
uint | numUnorderedAccessViews | Number of views to get. |
Returns
Type | Description |
---|---|
D3D11UnorderedAccessView[] | An array of interface pointers. |
ComputeShaderSetConstantBuffers(uint, D3D11Buffer[])
Sets the constant buffers used by the compute shader stage.
Declaration
public void ComputeShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers. |
ComputeShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the compute shader stage.
Declaration
public void ComputeShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
ComputeShaderSetShader(D3D11ComputeShader, D3D11ClassInstance[])
Set a compute shader to the device.
Declaration
public void ComputeShaderSetShader(D3D11ComputeShader computeShader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11ComputeShader | computeShader | A compute shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
ComputeShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the compute shader stage.
Declaration
public void ComputeShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |
ComputeShaderSetUnorderedAccessViews(uint, D3D11UnorderedAccessView[], uint[])
Sets an array of views for an unordered resource.
Declaration
public void ComputeShaderSetUnorderedAccessViews(uint startSlot, D3D11UnorderedAccessView[] unorderedAccessViews, uint[] uavInitialCounts)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index of the first element in the zero-based array to begin setting. |
D3D11UnorderedAccessView[] | unorderedAccessViews | An array of unordered access views to be set. |
uint[] | uavInitialCounts | An array of append and consume buffer offsets. A value of |
CopyResource(D3D11Resource, D3D11Resource)
Copy the entire contents of the source resource to the destination resource using the GPU.
Declaration
public void CopyResource(D3D11Resource destination, D3D11Resource source)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | destination | The destination resource. |
D3D11Resource | source | The source resource. |
CopyStructureCount(D3D11Buffer, uint, D3D11UnorderedAccessView)
Copies data from a buffer holding variable length data.
Declaration
public void CopyStructureCount(D3D11Buffer destinationBuffer, uint destinationAlignedByteOffset, D3D11UnorderedAccessView sourceView)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | destinationBuffer | The destination buffer. |
uint | destinationAlignedByteOffset | Offset from the start of the buffer to write 32-bit UINT structure (vertex) count. |
D3D11UnorderedAccessView | sourceView | A structured buffer resource. |
CopySubresourceRegion(D3D11Resource, uint, uint, uint, uint, D3D11Resource, uint, D3D11Box)
Copy a region from a source resource to a destination resource.
Declaration
public void CopySubresourceRegion(D3D11Resource destinationResource, uint destinationSubresource, uint destinationX, uint destinationY, uint destinationZ, D3D11Resource sourceResource, uint sourceSubresource, D3D11Box sourceBox)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | destinationResource | The destination resource. |
uint | destinationSubresource | Destination subresource index. |
uint | destinationX | The x-coordinate of the upper left corner of the destination region. |
uint | destinationY | The y-coordinate of the upper left corner of the destination region. |
uint | destinationZ | The z-coordinate of the upper left corner of the destination region. |
D3D11Resource | sourceResource | The source resource. |
uint | sourceSubresource | Source subresource index. |
D3D11Box | sourceBox | A 3D box that defines the source subresource that can be copied. |
Dispatch(uint, uint, uint)
Execute a command list from a thread group.
Declaration
public void Dispatch(uint threadGroupCountX, uint threadGroupCountY, uint threadGroupCountZ)
Parameters
Type | Name | Description |
---|---|---|
uint | threadGroupCountX | The number of groups dispatched in the x direction. |
uint | threadGroupCountY | The number of groups dispatched in the y direction. |
uint | threadGroupCountZ | The number of groups dispatched in the z direction. |
DispatchIndirect(D3D11Buffer, uint)
Execute a command list over one or more thread groups.
Declaration
public void DispatchIndirect(D3D11Buffer bufferForArgs, uint alignedByteOffsetForArgs)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | bufferForArgs | A buffer, which must be loaded with data that matches the argument list. |
uint | alignedByteOffsetForArgs | A byte-aligned offset between the start of the buffer and the arguments. |
DomainShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the domain shader stage.
Declaration
public D3D11Buffer[] DomainShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned by the method. |
DomainShaderGetSamplers(uint, uint)
Get an array of sampler state interfaces from the domain shader stage.
Declaration
public D3D11SamplerState[] DomainShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | An array of sampler-state interfaces. |
DomainShaderGetShader()
Get the domain shader currently set on the device.
Declaration
public D3D11DomainShader DomainShaderGetShader()
Returns
Type | Description |
---|---|
D3D11DomainShader | A domain shader. |
DomainShaderGetShader(uint, out D3D11ClassInstance[])
Get the domain shader currently set on the device.
Declaration
public D3D11DomainShader DomainShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11DomainShader | A domain shader. |
DomainShaderGetShaderResources(uint, uint)
Get the domain shader resources.
Declaration
public D3D11ShaderResourceView[] DomainShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
DomainShaderSetConstantBuffers(uint, D3D11Buffer[])
Sets the constant buffers used by the domain shader stage.
Declaration
public void DomainShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers being given to the device. |
DomainShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the domain shader stage.
Declaration
public void DomainShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
DomainShaderSetShader(D3D11DomainShader, D3D11ClassInstance[])
Set a domain shader to the device.
Declaration
public void DomainShaderSetShader(D3D11DomainShader domainShader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11DomainShader | domainShader | A domain shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
DomainShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the domain shader stage.
Declaration
public void DomainShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |
Draw(uint, uint)
Draw non-indexed, non-instanced primitives.
Declaration
public void Draw(uint vertexCount, uint startVertexLocation)
Parameters
Type | Name | Description |
---|---|---|
uint | vertexCount | Number of vertices to draw. |
uint | startVertexLocation | Index of the first vertex, which is usually an offset in a vertex buffer. |
DrawAuto()
Draw geometry of an unknown size.
Declaration
public void DrawAuto()
DrawIndexed(uint, uint, int)
Draw indexed, non-instanced primitives.
Declaration
public void DrawIndexed(uint indexCount, uint startIndexLocation, int baseVertexLocation)
Parameters
Type | Name | Description |
---|---|---|
uint | indexCount | Number of indices to draw. |
uint | startIndexLocation | The location of the first index read by the GPU from the index buffer. |
int | baseVertexLocation | A value added to each index before reading a vertex from the vertex buffer. |
DrawIndexedInstanced(uint, uint, uint, int, uint)
Draw indexed, instanced primitives.
Declaration
public void DrawIndexedInstanced(uint indexCountPerInstance, uint instanceCount, uint startIndexLocation, int baseVertexLocation, uint startInstanceLocation)
Parameters
Type | Name | Description |
---|---|---|
uint | indexCountPerInstance | Number of indices read from the index buffer for each instance. |
uint | instanceCount | Number of instances to draw. |
uint | startIndexLocation | The location of the first index read by the GPU from the index buffer. |
int | baseVertexLocation | A value added to each index before reading a vertex from the vertex buffer. |
uint | startInstanceLocation | A value added to each index before reading per-instance data from a vertex buffer. |
DrawIndexedInstancedIndirect(D3D11Buffer, uint)
Draw indexed, instanced, GPU-generated primitives.
Declaration
public void DrawIndexedInstancedIndirect(D3D11Buffer bufferForArgs, uint alignedByteOffsetForArgs)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | bufferForArgs | A buffer containing the GPU generated primitives. |
uint | alignedByteOffsetForArgs | Offset to the start of the GPU generated primitives. |
DrawInstanced(uint, uint, uint, uint)
Draw non-indexed, instanced primitives.
Declaration
public void DrawInstanced(uint vertexCountPerInstance, uint instanceCount, uint startVertexLocation, uint startInstanceLocation)
Parameters
Type | Name | Description |
---|---|---|
uint | vertexCountPerInstance | Number of vertices to draw. |
uint | instanceCount | Number of instances to draw. |
uint | startVertexLocation | Index of the first vertex. |
uint | startInstanceLocation | A value added to each index before reading per-instance data from a vertex buffer. |
DrawInstancedIndirect(D3D11Buffer, uint)
Draw instanced, GPU-generated primitives.
Declaration
public void DrawInstancedIndirect(D3D11Buffer bufferForArgs, uint alignedByteOffsetForArgs)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | bufferForArgs | A buffer containing the GPU generated primitives. |
uint | alignedByteOffsetForArgs | Offset to the start of the GPU generated primitives. |
End(D3D11Asynchronous)
Mark the end of a series of commands.
Declaration
public void End(D3D11Asynchronous async)
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface. |
ExecuteCommandList(D3D11CommandList, bool)
Queues commands from a command list onto a device.
Declaration
public void ExecuteCommandList(D3D11CommandList commandList, bool restoreContextState)
Parameters
Type | Name | Description |
---|---|---|
D3D11CommandList | commandList | A command list. |
bool | restoreContextState | A value indicating whether the target context state is saved prior to and restored after the execution of a command list. |
FinishCommandList(bool)
Create a command list and record graphics commands into it.
Declaration
public D3D11CommandList FinishCommandList(bool restoreDeferredContextState)
Parameters
Type | Name | Description |
---|---|---|
bool | restoreDeferredContextState | A value indicating whether the runtime saves deferred context state before it executes |
Returns
Type | Description |
---|---|
D3D11CommandList | The recorded command list. |
Flush()
Sends queued-up commands in the command buffer to the graphics processing unit (GPU).
Declaration
public void Flush()
GenerateMips(D3D11ShaderResourceView)
Generates mipmaps for the given shader resource.
Declaration
public void GenerateMips(D3D11ShaderResourceView shaderResourceView)
Parameters
Type | Name | Description |
---|---|---|
D3D11ShaderResourceView | shaderResourceView | The shader resource. |
GeometryShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the geometry shader pipeline stage.
Declaration
public D3D11Buffer[] GeometryShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned. |
GeometryShaderGetSamplers(uint, uint)
Get an array of sampler state interfaces from the geometry shader pipeline stage.
Declaration
public D3D11SamplerState[] GeometryShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | An array of sampler-state interfaces. |
GeometryShaderGetShader()
Get the geometry shader currently set on the device.
Declaration
public D3D11GeometryShader GeometryShaderGetShader()
Returns
Type | Description |
---|---|
D3D11GeometryShader | A geometry shader. |
GeometryShaderGetShader(uint, out D3D11ClassInstance[])
Get the geometry shader currently set on the device.
Declaration
public D3D11GeometryShader GeometryShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11GeometryShader | A geometry shader. |
GeometryShaderGetShaderResources(uint, uint)
Get the geometry shader resources.
Declaration
public D3D11ShaderResourceView[] GeometryShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
GeometryShaderSetConstantBuffers(uint, D3D11Buffer[])
Sets the constant buffers used by the geometry shader pipeline stage.
Declaration
public void GeometryShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers. |
GeometryShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the geometry shader pipeline stage.
Declaration
public void GeometryShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
GeometryShaderSetShader(D3D11GeometryShader, D3D11ClassInstance[])
Set a geometry shader to the device.
Declaration
public void GeometryShaderSetShader(D3D11GeometryShader shader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11GeometryShader | shader | A geometry shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
GeometryShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the geometry shader stage.
Declaration
public void GeometryShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |
GetData(D3D11Asynchronous)
Get data from the graphics processing unit (GPU) asynchronously.
Declaration
public bool GetData(D3D11Asynchronous async)
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface for the object about which |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the operation succeeded. |
GetData(D3D11Asynchronous, D3D11AsyncGetDataOptions)
Get data from the graphics processing unit (GPU) asynchronously.
Declaration
public bool GetData(D3D11Asynchronous async, D3D11AsyncGetDataOptions options)
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface for the object about which |
D3D11AsyncGetDataOptions | options | Optional flags. |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the operation succeeded. |
GetData<T>(D3D11Asynchronous, D3D11AsyncGetDataOptions, out T)
Get data from the graphics processing unit (GPU) asynchronously.
Declaration
public bool GetData<T>(D3D11Asynchronous async, D3D11AsyncGetDataOptions options, out T data) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface for the object about which |
D3D11AsyncGetDataOptions | options | Optional flags. |
T | data | The data. |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the operation succeeded. |
Type Parameters
Name | Description |
---|---|
T | The type of data. |
GetData<T>(D3D11Asynchronous, out T)
Get data from the graphics processing unit (GPU) asynchronously.
Declaration
public bool GetData<T>(D3D11Asynchronous async, out T data) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11Asynchronous | async | A D3D11Asynchronous interface for the object about which |
T | data | The data. |
Returns
Type | Description |
---|---|
bool | A boolean value indicating whether the operation succeeded. |
Type Parameters
Name | Description |
---|---|
T | The type of data. |
GetPredication(out D3D11Predicate, out bool)
Get the rendering predicate state.
Declaration
public void GetPredication(out D3D11Predicate predicate, out bool predicateValue)
Parameters
Type | Name | Description |
---|---|---|
D3D11Predicate | predicate | A predicate. |
bool | predicateValue | The predicate comparison value. |
GetResourceMinLod(D3D11Resource)
Gets the minimum level-of-detail (LOD).
Declaration
public float GetResourceMinLod(D3D11Resource resource)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | The resource. |
Returns
Type | Description |
---|---|
float | The minimum LOD. |
HullShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the hull shader stage.
Declaration
public D3D11Buffer[] HullShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned by the method. |
HullShaderGetSamplers(uint, uint)
Get an array of sampler state interfaces from the hull shader stage.
Declaration
public D3D11SamplerState[] HullShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | An array of sampler-state interfaces. |
HullShaderGetShader()
Get the hull shader currently set on the device.
Declaration
public D3D11HullShader HullShaderGetShader()
Returns
Type | Description |
---|---|
D3D11HullShader | A hull shader. |
HullShaderGetShader(uint, out D3D11ClassInstance[])
Get the hull shader currently set on the device.
Declaration
public D3D11HullShader HullShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11HullShader | A hull shader. |
HullShaderGetShaderResources(uint, uint)
Get the hull shader resources.
Declaration
public D3D11ShaderResourceView[] HullShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
HullShaderSetConstantBuffers(uint, D3D11Buffer[])
Set the constant buffers used by the hull shader stage.
Declaration
public void HullShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers being given to the device. |
HullShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the hull shader stage.
Declaration
public void HullShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
HullShaderSetShader(D3D11HullShader, D3D11ClassInstance[])
Set a hull shader to the device.
Declaration
public void HullShaderSetShader(D3D11HullShader hullShader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11HullShader | hullShader | A hull shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
HullShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the hull shader stage.
Declaration
public void HullShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |
InputAssemblerGetIndexBuffer(out D3D11Buffer, out DxgiFormat, out uint)
Get the index buffer that is bound to the input-assembler stage.
Declaration
public void InputAssemblerGetIndexBuffer(out D3D11Buffer indexBuffer, out DxgiFormat format, out uint offset)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | indexBuffer | An index buffer. |
DxgiFormat | format | The format of the data in the index buffer. |
uint | offset | Offset (in bytes) from the start of the index buffer, to the first index to use. |
InputAssemblerGetInputLayout()
Get the input-layout object that is bound to the input-assembler stage.
Declaration
public D3D11InputLayout InputAssemblerGetInputLayout()
Returns
Type | Description |
---|---|
D3D11InputLayout | The input-layout object. |
InputAssemblerGetPrimitiveTopology()
Get information about the primitive type, and data order that describes input data for the input assembler stage.
Declaration
public D3D11PrimitiveTopology InputAssemblerGetPrimitiveTopology()
Returns
Type | Description |
---|---|
D3D11PrimitiveTopology | The type of primitive, and ordering of the primitive data. |
InputAssemblerGetVertexBuffers(uint, uint, out D3D11Buffer[], out uint[], out uint[])
Get the vertex buffers bound to the input-assembler stage.
Declaration
public void InputAssemblerGetVertexBuffers(uint startSlot, uint numBuffers, out D3D11Buffer[] vertexBuffers, out uint[] strides, out uint[] offsets)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | The input slot of the first vertex buffer to get. |
uint | numBuffers | The number of vertex buffers to get starting at the offset. |
D3D11Buffer[] | vertexBuffers | An array of vertex buffers. |
uint[] | strides | An array of stride values. |
uint[] | offsets | An array of offset values. |
InputAssemblerSetIndexBuffer(D3D11Buffer, DxgiFormat, uint)
Bind an index buffer to the input-assembler stage.
Declaration
public void InputAssemblerSetIndexBuffer(D3D11Buffer indexBuffer, DxgiFormat format, uint offset)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | indexBuffer | An D3D11Buffer object, that contains indices. |
DxgiFormat | format | The format of the data in the index buffer. |
uint | offset | Offset (in bytes) from the start of the index buffer to the first index to use. |
InputAssemblerSetInputLayout(D3D11InputLayout)
Bind an input-layout object to the input-assembler stage.
Declaration
public void InputAssemblerSetInputLayout(D3D11InputLayout inputLayout)
Parameters
Type | Name | Description |
---|---|---|
D3D11InputLayout | inputLayout | The input-layout object. |
InputAssemblerSetPrimitiveTopology(D3D11PrimitiveTopology)
Bind information about the primitive type, and data order that describes input data for the input assembler stage.
Declaration
public void InputAssemblerSetPrimitiveTopology(D3D11PrimitiveTopology topology)
Parameters
Type | Name | Description |
---|---|---|
D3D11PrimitiveTopology | topology | The type of primitive and ordering of the primitive data. |
InputAssemblerSetVertexBuffers(uint, D3D11Buffer[], uint[], uint[])
Bind an array of vertex buffers to the input-assembler stage.
Declaration
public void InputAssemblerSetVertexBuffers(uint startSlot, D3D11Buffer[] vertexBuffers, uint[] strides, uint[] offsets)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | The first input slot for binding. |
D3D11Buffer[] | vertexBuffers | An array of vertex buffers. |
uint[] | strides | An array of stride values; one stride value for each buffer in the vertex-buffer array. |
uint[] | offsets | An array of offset values; one offset value for each buffer in the vertex-buffer array. |
Map(D3D11Resource, uint, D3D11MapCpuPermission, D3D11MapOptions)
Gets a pointer to the data contained in a subresource, and denies the GPU access to that subresource.
Declaration
public D3D11MappedSubResource Map(D3D11Resource resource, uint subresource, D3D11MapCpuPermission cpuPermission, D3D11MapOptions options)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | A D3D11Resource interface. |
uint | subresource | Index number of the subresource. |
D3D11MapCpuPermission | cpuPermission | The CPU's read and write permissions for a resource. |
D3D11MapOptions | options | Specifies what the CPU does when the GPU is busy. |
Returns
Type | Description |
---|---|
D3D11MappedSubResource | The mapped subresource. |
OutputMergerGetBlendState(out D3D11BlendState, out float[], out uint)
Get the blend state of the output-merger stage.
Declaration
public void OutputMergerGetBlendState(out D3D11BlendState blendState, out float[] blendFactor, out uint sampleMask)
Parameters
Type | Name | Description |
---|---|---|
D3D11BlendState | blendState | A blend-state interface. |
float[] | blendFactor | Array of blend factors, one for each RGBA component. |
uint | sampleMask | A sample mask. |
OutputMergerGetDepthStencilState(out D3D11DepthStencilState, out uint)
Gets the depth-stencil state of the output-merger stage.
Declaration
public void OutputMergerGetDepthStencilState(out D3D11DepthStencilState depthStencilState, out uint stencilReference)
Parameters
Type | Name | Description |
---|---|---|
D3D11DepthStencilState | depthStencilState | A depth-stencil state interface. |
uint | stencilReference | The stencil reference value used in the depth-stencil test. |
OutputMergerGetRenderTargets(uint, out D3D11RenderTargetView[], out D3D11DepthStencilView)
Get pointers to the resources bound to the output-merger stage.
Declaration
public void OutputMergerGetRenderTargets(uint numViews, out D3D11RenderTargetView[] renderTargetViews, out D3D11DepthStencilView depthStencilView)
Parameters
Type | Name | Description |
---|---|---|
uint | numViews | Number of render targets to retrieve. |
D3D11RenderTargetView[] | renderTargetViews | The render target views. |
D3D11DepthStencilView | depthStencilView | A depth-stencil view. |
OutputMergerGetRenderTargetsAndUnorderedAccessViews(uint, out D3D11RenderTargetView[], out D3D11DepthStencilView, uint, uint, out D3D11UnorderedAccessView[])
Get pointers to the resources bound to the output-merger stage.
Declaration
public void OutputMergerGetRenderTargetsAndUnorderedAccessViews(uint numRenderTargetViews, out D3D11RenderTargetView[] renderTargetViews, out D3D11DepthStencilView depthStencilView, uint uavStartSlot, uint numUnorderedAccessViews, out D3D11UnorderedAccessView[] unorderedAccessViews)
Parameters
Type | Name | Description |
---|---|---|
uint | numRenderTargetViews | The number of render-target views to retrieve. |
D3D11RenderTargetView[] | renderTargetViews | The render-target views. |
D3D11DepthStencilView | depthStencilView | A depth-stencil view. |
uint | uavStartSlot | Index into a zero-based array to begin retrieving unordered-access views. |
uint | numUnorderedAccessViews | Number of unordered-access views to return. |
D3D11UnorderedAccessView[] | unorderedAccessViews | The unordered-access views that are retrieved. |
OutputMergerSetBlendState(D3D11BlendState, float[], uint)
Set the blend state of the output-merger stage.
Declaration
public void OutputMergerSetBlendState(D3D11BlendState blendState, float[] blendFactor, uint sampleMask)
Parameters
Type | Name | Description |
---|---|---|
D3D11BlendState | blendState | A blend-state interface. |
float[] | blendFactor | Array of blend factors, one for each RGBA component. The blend factors modulate values for the pixel shader, render target, or both. |
uint | sampleMask | 32-bit sample coverage. The default value is |
OutputMergerSetDepthStencilState(D3D11DepthStencilState, uint)
Sets the depth-stencil state of the output-merger stage.
Declaration
public void OutputMergerSetDepthStencilState(D3D11DepthStencilState depthStencilState, uint stencilReference)
Parameters
Type | Name | Description |
---|---|---|
D3D11DepthStencilState | depthStencilState | A depth-stencil state interface. |
uint | stencilReference | Reference value to perform against when doing a depth-stencil test. |
OutputMergerSetRenderTargets(D3D11RenderTargetView[], D3D11DepthStencilView)
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.
Declaration
public void OutputMergerSetRenderTargets(D3D11RenderTargetView[] renderTargetViews, D3D11DepthStencilView depthStencilView)
Parameters
Type | Name | Description |
---|---|---|
D3D11RenderTargetView[] | renderTargetViews | The render targets to bind to the device. |
D3D11DepthStencilView | depthStencilView | The depth-stencil view to bind to the device. |
OutputMergerSetRenderTargetsAndUnorderedAccessViews(D3D11RenderTargetView[], D3D11DepthStencilView, uint, D3D11UnorderedAccessView[], uint[])
Binds resources to the output-merger stage.
Declaration
public void OutputMergerSetRenderTargetsAndUnorderedAccessViews(D3D11RenderTargetView[] renderTargetViews, D3D11DepthStencilView depthStencilView, uint uavStartSlot, D3D11UnorderedAccessView[] unorderedAccessViews, uint[] uavInitialCounts)
Parameters
Type | Name | Description |
---|---|---|
D3D11RenderTargetView[] | renderTargetViews | The render targets to bind to the device. |
D3D11DepthStencilView | depthStencilView | The depth-stencil view to bind to the device. |
uint | uavStartSlot | Index into a zero-based array to begin setting unordered-access views. |
D3D11UnorderedAccessView[] | unorderedAccessViews | The unordered-access views to bind to the device. |
uint[] | uavInitialCounts | An array of append and consume buffer offsets. A value of |
PixelShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the pixel shader pipeline stage.
Declaration
public D3D11Buffer[] PixelShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned. |
PixelShaderGetSamplers(uint, uint)
Get an array of sampler states from the pixel shader pipeline stage.
Declaration
public D3D11SamplerState[] PixelShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | Array of sampler-state interface pointers. |
PixelShaderGetShader()
Get the pixel shader currently set on the device.
Declaration
public D3D11PixelShader PixelShaderGetShader()
Returns
Type | Description |
---|---|
D3D11PixelShader | A pixel shader. |
PixelShaderGetShader(uint, out D3D11ClassInstance[])
Get the pixel shader currently set on the device.
Declaration
public D3D11PixelShader PixelShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11PixelShader | A pixel shader. |
PixelShaderGetShaderResources(uint, uint)
Get the pixel shader resources.
Declaration
public D3D11ShaderResourceView[] PixelShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
PixelShaderSetConstantBuffers(uint, D3D11Buffer[])
Sets the constant buffers used by the pixel shader pipeline stage.
Declaration
public void PixelShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers. |
PixelShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the pixel shader pipeline stage.
Declaration
public void PixelShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
PixelShaderSetShader(D3D11PixelShader, D3D11ClassInstance[])
Sets a pixel shader to the device.
Declaration
public void PixelShaderSetShader(D3D11PixelShader pixelShader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11PixelShader | pixelShader | A pixel shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
PixelShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the pixel shader stage.
Declaration
public void PixelShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |
RasterizerStageGetScissorRects()
Get the array of scissor rectangles bound to the rasterizer stage.
Declaration
public D3D11Rect[] RasterizerStageGetScissorRects()
Returns
Type | Description |
---|---|
D3D11Rect[] | An array of scissor rectangles. |
RasterizerStageGetState()
Get the rasterizer state from the rasterizer stage of the pipeline.
Declaration
public D3D11RasterizerState RasterizerStageGetState()
Returns
Type | Description |
---|---|
D3D11RasterizerState | A rasterizer-state interface. |
RasterizerStageGetViewports()
Gets the array of viewports bound to the rasterizer stage.
Declaration
public D3D11Viewport[] RasterizerStageGetViewports()
Returns
Type | Description |
---|---|
D3D11Viewport[] | The viewports that are bound to the rasterizer stage. |
RasterizerStageSetScissorRects(D3D11Rect[])
Bind an array of scissor rectangles to the rasterizer stage.
Declaration
public void RasterizerStageSetScissorRects(D3D11Rect[] rects)
Parameters
Type | Name | Description |
---|---|---|
D3D11Rect[] | rects | An array of scissor rectangles. |
RasterizerStageSetState(D3D11RasterizerState)
Set the rasterizer state for the rasterizer stage of the pipeline.
Declaration
public void RasterizerStageSetState(D3D11RasterizerState rasterizerState)
Parameters
Type | Name | Description |
---|---|---|
D3D11RasterizerState | rasterizerState | A rasterizer-state interface. |
RasterizerStageSetViewports(D3D11Viewport[])
Bind an array of viewports to the rasterizer stage of the pipeline.
Declaration
public void RasterizerStageSetViewports(D3D11Viewport[] viewports)
Parameters
Type | Name | Description |
---|---|---|
D3D11Viewport[] | viewports | An array of D3D11Viewport structures to bind to the device. |
ResolveSubresource(D3D11Resource, uint, D3D11Resource, uint, DxgiFormat)
Copy a multisampled resource into a non-multisampled resource.
Declaration
public void ResolveSubresource(D3D11Resource destinationResource, uint destinationSubresource, D3D11Resource sourceResource, uint sourceSubresource, DxgiFormat format)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | destinationResource | Destination resource. |
uint | destinationSubresource | A zero-based index, that identifies the destination subresource. |
D3D11Resource | sourceResource | Source resource. |
uint | sourceSubresource | The source subresource of the source resource. |
DxgiFormat | format | Indicates how the multisampled resource will be resolved to a single-sampled resource. |
SetPredication(D3D11Predicate, bool)
Set a rendering predicate.
Declaration
public void SetPredication(D3D11Predicate predicate, bool value)
Parameters
Type | Name | Description |
---|---|---|
D3D11Predicate | predicate | A predicate. |
bool | value | A value indicating whether rendering will be affected by when the predicate's conditions are met or not met. |
SetResourceMinLod(D3D11Resource, float)
Sets the minimum level-of-detail (LOD) for a resource.
Declaration
public void SetResourceMinLod(D3D11Resource resource, float minLod)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | The resource. |
float | minLod | The level-of-detail, which ranges between 0 and the maximum number of mipmap levels of the resource. |
StreamOutputGetTargets(uint)
Get the target output buffers for the stream-output stage of the pipeline.
Declaration
public D3D11Buffer[] StreamOutputGetTargets(uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | numBuffers | Number of buffers to get. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | An array of output buffers to be retrieved from the device. |
StreamOutputSetTargets(D3D11Buffer[], uint[])
Reference value to perform against when doing a depth-stencil test.
Declaration
public void StreamOutputSetTargets(D3D11Buffer[] targets, uint[] offsets)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer[] | targets | The array of output buffers to bind to the device. |
uint[] | offsets | Array of offsets to the output buffers. |
Unmap(D3D11Resource, uint)
Invalidate the pointer to a resource and reenable the GPU's access to that resource.
Declaration
public void Unmap(D3D11Resource resource, uint subresource)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | A D3D11Resource interface. |
uint | subresource | A subresource to be unmapped. |
UpdateSubresource<T>(D3D11Resource, uint, D3D11Box?, T, uint, uint)
The CPU copies data from memory to a subresource created in non-mappable memory.
Declaration
public void UpdateSubresource<T>(D3D11Resource destinationResource, uint destinationSubresource, D3D11Box? destinationBox, T sourceData, uint sourceRowPitch, uint sourceDepthPitch) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | destinationResource | The destination resource. |
uint | destinationSubresource | A zero-based index, that identifies the destination subresource. |
D3D11Box? | destinationBox | A box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. |
T | sourceData | A pointer to the source data in memory. |
uint | sourceRowPitch | The size of one row of the source data. |
uint | sourceDepthPitch | The size of one depth slice of source data. |
Type Parameters
Name | Description |
---|---|
T | The type of data. |
UpdateSubresource<T>(D3D11Resource, uint, D3D11Box?, T[], uint, uint)
The CPU copies data from memory to a subresource created in non-mappable memory.
Declaration
public void UpdateSubresource<T>(D3D11Resource destinationResource, uint destinationSubresource, D3D11Box? destinationBox, T[] sourceData, uint sourceRowPitch, uint sourceDepthPitch) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | destinationResource | The destination resource. |
uint | destinationSubresource | A zero-based index, that identifies the destination subresource. |
D3D11Box? | destinationBox | A box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. |
T[] | sourceData | A pointer to the source data in memory. |
uint | sourceRowPitch | The size of one row of the source data. |
uint | sourceDepthPitch | The size of one depth slice of source data. |
Type Parameters
Name | Description |
---|---|
T | The type of data. |
VertexShaderGetConstantBuffers(uint, uint)
Get the constant buffers used by the vertex shader pipeline stage.
Declaration
public D3D11Buffer[] VertexShaderGetConstantBuffers(uint startSlot, uint numBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin retrieving constant buffers from. |
uint | numBuffers | Number of buffers to retrieve. |
Returns
Type | Description |
---|---|
D3D11Buffer[] | Array of constant buffer interface pointers to be returned. |
VertexShaderGetSamplers(uint, uint)
Get an array of sampler states from the vertex shader pipeline stage.
Declaration
public D3D11SamplerState[] VertexShaderGetSamplers(uint startSlot, uint numSamplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into a zero-based array to begin getting samplers from. |
uint | numSamplers | Number of samplers to get from a device context. |
Returns
Type | Description |
---|---|
D3D11SamplerState[] | Array of sampler-state interface pointers to be returned by the device. |
VertexShaderGetShader()
Get the vertex shader currently set on the device.
Declaration
public D3D11VertexShader VertexShaderGetShader()
Returns
Type | Description |
---|---|
D3D11VertexShader | A vertex shader. |
VertexShaderGetShader(uint, out D3D11ClassInstance[])
Get the vertex shader currently set on the device.
Declaration
public D3D11VertexShader VertexShaderGetShader(uint numClassInstances, out D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
uint | numClassInstances | The number of class-instance elements in the array. |
D3D11ClassInstance[] | classInstances | An array of class instance interfaces. |
Returns
Type | Description |
---|---|
D3D11VertexShader | A vertex shader. |
VertexShaderGetShaderResources(uint, uint)
Get the vertex shader resources.
Declaration
public D3D11ShaderResourceView[] VertexShaderGetShaderResources(uint startSlot, uint numViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin getting shader resources from. |
uint | numViews | The number of resources to get from the device. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView[] | Array of shader resource view interfaces to be returned by the device. |
VertexShaderSetConstantBuffers(uint, D3D11Buffer[])
Sets the constant buffers used by the vertex shader pipeline stage.
Declaration
public void VertexShaderSetConstantBuffers(uint startSlot, D3D11Buffer[] constantBuffers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting constant buffers to. |
D3D11Buffer[] | constantBuffers | Array of constant buffers being given to the device. |
VertexShaderSetSamplers(uint, D3D11SamplerState[])
Set an array of sampler states to the vertex shader pipeline stage.
Declaration
public void VertexShaderSetSamplers(uint startSlot, D3D11SamplerState[] samplers)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting samplers to. |
D3D11SamplerState[] | samplers | An array of sampler-state interfaces. |
VertexShaderSetShader(D3D11VertexShader, D3D11ClassInstance[])
Set a vertex shader to the device.
Declaration
public void VertexShaderSetShader(D3D11VertexShader vertexShader, D3D11ClassInstance[] classInstances)
Parameters
Type | Name | Description |
---|---|---|
D3D11VertexShader | vertexShader | A vertex shader. |
D3D11ClassInstance[] | classInstances | An array of class-instance interfaces. |
VertexShaderSetShaderResources(uint, D3D11ShaderResourceView[])
Bind an array of shader resources to the vertex shader stage.
Declaration
public void VertexShaderSetShaderResources(uint startSlot, D3D11ShaderResourceView[] shaderResourceViews)
Parameters
Type | Name | Description |
---|---|---|
uint | startSlot | Index into the device's zero-based array to begin setting shader resources to. |
D3D11ShaderResourceView[] | shaderResourceViews | Array of shader resource view interfaces to set to the device. |