[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct3D11.DeviceContext

Class DeviceContext

Namespace
GrapeCity.Documents.DX.Direct3D11
Assembly
GcDocs.DX.Windows.dll

ID3D11DeviceContext

[Guid("c0bfa96c-e089-44fb-8eaf-26f8796190da")]
public class DeviceContext : DeviceChild, IDisposable, IUnknown
Inheritance
object
DeviceContext
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

DeviceContext(IntPtr)

Initializes a new instance of the DeviceContext class.

public DeviceContext(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

ComputeShader

Inner interface giving access to ComputeShaderStage methods.

public ComputeShaderStage ComputeShader { get; }

Property Value

ComputeShaderStage

DomainShader

Inner interface giving access to DomainShaderStage methods.

public DomainShaderStage DomainShader { get; }

Property Value

DomainShaderStage

GeometryShader

Inner interface giving access to GeometryShaderStage methods.

public GeometryShaderStage GeometryShader { get; }

Property Value

GeometryShaderStage

HullShader

Inner interface giving access to HullShaderStage methods.

public HullShaderStage HullShader { get; }

Property Value

HullShaderStage

InputAssembler

Inner interface giving access to InputAssemblerStage methods.

public InputAssemblerStage InputAssembler { get; }

Property Value

InputAssemblerStage

OutputMerger

Inner interface giving access to OutputMergerStage methods.

public OutputMergerStage OutputMerger { get; }

Property Value

OutputMergerStage

PixelShader

Inner interface giving access to PixelShaderStage methods.

public PixelShaderStage PixelShader { get; }

Property Value

PixelShaderStage

Rasterizer

Inner interface giving access to RasterizerStage methods.

public RasterizerStage Rasterizer { get; }

Property Value

RasterizerStage

StreamOutput

Inner interface giving access to StreamOutputStage methods.

public StreamOutputStage StreamOutput { get; }

Property Value

StreamOutputStage

VertexShader

Inner interface giving access to VertexShaderStage methods.

public VertexShaderStage VertexShader { get; }

Property Value

VertexShaderStage

Methods

Begin(Asynchronous)

void ID3D11DeviceContext::Begin([In] ID3D11Asynchronous* pAsync)

public void Begin(Asynchronous asyncRef)

Parameters

asyncRef Asynchronous

ClearDepthStencilView(DepthStencilView, DepthStencilClearFlags, float, byte)

void ID3D11DeviceContext::ClearDepthStencilView([In] ID3D11DepthStencilView* pDepthStencilView,[In] D3D11_CLEAR_FLAG ClearFlags,[In] float Depth,[In] unsigned char Stencil)

public void ClearDepthStencilView(DepthStencilView depthStencilViewRef, DepthStencilClearFlags clearFlags, float depth, byte stencil)

Parameters

depthStencilViewRef DepthStencilView
clearFlags DepthStencilClearFlags
depth float
stencil byte

ClearRenderTargetView(RenderTargetView, ColorF)

void ID3D11DeviceContext::ClearRenderTargetView([In] ID3D11RenderTargetView* pRenderTargetView,[In] const SHARPDX_COLOR4* ColorRGBA)

public void ClearRenderTargetView(RenderTargetView renderTargetViewRef, ColorF colorRGBA)

Parameters

renderTargetViewRef RenderTargetView
colorRGBA ColorF

ClearState()

void ID3D11DeviceContext::ClearState()

public void ClearState()

ClearUnorderedAccessView(UnorderedAccessView, Vector4)

void ID3D11DeviceContext::ClearUnorderedAccessViewFloat([In] ID3D11UnorderedAccessView* pUnorderedAccessView,[In] const SHARPDX_VECTOR4* Values)

public void ClearUnorderedAccessView(UnorderedAccessView unorderedAccessViewRef, Vector4 values)

Parameters

unorderedAccessViewRef UnorderedAccessView
values Vector4

ClearUnorderedAccessView(UnorderedAccessView, int[])

void ID3D11DeviceContext::ClearUnorderedAccessViewUint([In] ID3D11UnorderedAccessView* pUnorderedAccessView,[In] const SHARPDX_INT4* Values)

public void ClearUnorderedAccessView(UnorderedAccessView unorderedAccessViewRef, int[] values)

Parameters

unorderedAccessViewRef UnorderedAccessView
values int[]

CopyResource_(Resource, Resource)

void ID3D11DeviceContext::CopyResource([In] ID3D11Resource* pDstResource,[In] ID3D11Resource* pSrcResource)

public void CopyResource_(Resource dstResourceRef, Resource srcResourceRef)

Parameters

dstResourceRef Resource
srcResourceRef Resource

CopyResource(Resource, Resource)

Copy the entire contents of the source resource to the destination resource using the GPU.

public void CopyResource(Resource source, Resource destination)

Parameters

source Resource

A reference to the source resource (see Resource).

destination Resource

A reference to the destination resource (see Resource).

CopyStructureCount(Buffer, int, UnorderedAccessView)

void ID3D11DeviceContext::CopyStructureCount([In] ID3D11Buffer* pDstBuffer,[In] unsigned int DstAlignedByteOffset,[In] ID3D11UnorderedAccessView* pSrcView)

public void CopyStructureCount(Buffer dstBufferRef, int dstAlignedByteOffset, UnorderedAccessView srcViewRef)

Parameters

dstBufferRef Buffer
dstAlignedByteOffset int
srcViewRef UnorderedAccessView

CopySubresourceRegion_(Resource, int, int, int, int, Resource, int, ResourceRegion?)

void ID3D11DeviceContext::CopySubresourceRegion([In] ID3D11Resource* pDstResource,[In] unsigned int DstSubresource,[In] unsigned int DstX,[In] unsigned int DstY,[In] unsigned int DstZ,[In] ID3D11Resource* pSrcResource,[In] unsigned int SrcSubresource,[In, Optional] const D3D11_BOX* pSrcBox)

public void CopySubresourceRegion_(Resource dstResourceRef, int dstSubresource, int dstX, int dstY, int dstZ, Resource srcResourceRef, int srcSubresource, ResourceRegion? srcBoxRef)

Parameters

dstResourceRef Resource
dstSubresource int
dstX int
dstY int
dstZ int
srcResourceRef Resource
srcSubresource int
srcBoxRef ResourceRegion?

CopySubresourceRegion(Resource, int, ResourceRegion?, Resource, int, int, int, int)

Copy a region from a source resource to a destination resource.

public void CopySubresourceRegion(Resource source, int sourceSubresource, ResourceRegion? sourceRegion, Resource destination, int destinationSubResource, int dstX = 0, int dstY = 0, int dstZ = 0)

Parameters

source Resource

A reference to the source resource (see Resource).

sourceSubresource int

Source subresource index.

sourceRegion ResourceRegion?

A reference to a 3D box (see ResourceRegion) that defines the source subresources that can be copied. If NULL, the entire source subresource is copied. The box must fit within the source resource.

destination Resource

A reference to the destination resource (see Resource).

destinationSubResource int

Destination subresource index.

dstX int

The x-coordinate of the upper left corner of the destination region.

dstY int

The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero.

dstZ int

The z-coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero.

Create(Device)

Constructs a new deferred context DeviceContext.

public static DeviceContext Create(Device device)

Parameters

device Device

The device with which to associate the state object.

Returns

DeviceContext

Dispatch(int, int, int)

void ID3D11DeviceContext::Dispatch([In] unsigned int ThreadGroupCountX,[In] unsigned int ThreadGroupCountY,[In] unsigned int ThreadGroupCountZ)

public void Dispatch(int threadGroupCountX, int threadGroupCountY, int threadGroupCountZ)

Parameters

threadGroupCountX int
threadGroupCountY int
threadGroupCountZ int

DispatchIndirect(Buffer, int)

void ID3D11DeviceContext::DispatchIndirect([In] ID3D11Buffer* pBufferForArgs,[In] unsigned int AlignedByteOffsetForArgs)

public void DispatchIndirect(Buffer bufferForArgsRef, int alignedByteOffsetForArgs)

Parameters

bufferForArgsRef Buffer
alignedByteOffsetForArgs int

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

Draw(int, int)

void ID3D11DeviceContext::Draw([In] unsigned int VertexCount,[In] unsigned int StartVertexLocation)

public void Draw(int vertexCount, int startVertexLocation)

Parameters

vertexCount int
startVertexLocation int

DrawAuto()

void ID3D11DeviceContext::DrawAuto()

public void DrawAuto()

DrawIndexed(int, int, int)

void ID3D11DeviceContext::DrawIndexed([In] unsigned int IndexCount,[In] unsigned int StartIndexLocation,[In] int BaseVertexLocation)

public void DrawIndexed(int indexCount, int startIndexLocation, int baseVertexLocation)

Parameters

indexCount int
startIndexLocation int
baseVertexLocation int

DrawIndexedInstanced(int, int, int, int, int)

void ID3D11DeviceContext::DrawIndexedInstanced([In] unsigned int IndexCountPerInstance,[In] unsigned int InstanceCount,[In] unsigned int StartIndexLocation,[In] int BaseVertexLocation,[In] unsigned int StartInstanceLocation)

public void DrawIndexedInstanced(int indexCountPerInstance, int instanceCount, int startIndexLocation, int baseVertexLocation, int startInstanceLocation)

Parameters

indexCountPerInstance int
instanceCount int
startIndexLocation int
baseVertexLocation int
startInstanceLocation int

DrawIndexedInstancedIndirect(Buffer, int)

void ID3D11DeviceContext::DrawIndexedInstancedIndirect([In] ID3D11Buffer* pBufferForArgs,[In] unsigned int AlignedByteOffsetForArgs)

public void DrawIndexedInstancedIndirect(Buffer bufferForArgsRef, int alignedByteOffsetForArgs)

Parameters

bufferForArgsRef Buffer
alignedByteOffsetForArgs int

DrawInstanced(int, int, int, int)

void ID3D11DeviceContext::DrawInstanced([In] unsigned int VertexCountPerInstance,[In] unsigned int InstanceCount,[In] unsigned int StartVertexLocation,[In] unsigned int StartInstanceLocation)

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

Parameters

vertexCountPerInstance int
instanceCount int
startVertexLocation int
startInstanceLocation int

DrawInstancedIndirect(Buffer, int)

void ID3D11DeviceContext::DrawInstancedIndirect([In] ID3D11Buffer* pBufferForArgs,[In] unsigned int AlignedByteOffsetForArgs)

public void DrawInstancedIndirect(Buffer bufferForArgsRef, int alignedByteOffsetForArgs)

Parameters

bufferForArgsRef Buffer
alignedByteOffsetForArgs int

End(Asynchronous)

void ID3D11DeviceContext::End([In] ID3D11Asynchronous* pAsync)

public void End(Asynchronous asyncRef)

Parameters

asyncRef Asynchronous

ExecuteCommandList(CommandList, Bool)

void ID3D11DeviceContext::ExecuteCommandList([In] ID3D11CommandList* pCommandList,[In] BOOL RestoreContextState)

public void ExecuteCommandList(CommandList commandListRef, Bool restoreContextState)

Parameters

commandListRef CommandList
restoreContextState Bool

FinishCommandList(Bool)

HRESULT ID3D11DeviceContext::FinishCommandList([In] BOOL RestoreDeferredContextState,[Out, Optional] ID3D11CommandList** ppCommandList)

public CommandList FinishCommandList(Bool restoreDeferredContextState)

Parameters

restoreDeferredContextState Bool

Returns

CommandList

Flush()

void ID3D11DeviceContext::Flush()

public void Flush()

GenerateMips(ShaderResourceView)

void ID3D11DeviceContext::GenerateMips([In] ID3D11ShaderResourceView* pShaderResourceView)

public void GenerateMips(ShaderResourceView shaderResourceViewRef)

Parameters

shaderResourceViewRef ShaderResourceView

GetContextFlags()

unsigned int ID3D11DeviceContext::GetContextFlags()

public int GetContextFlags()

Returns

int

GetData(Asynchronous, AsynchronousFlags)

Gets data from the GPU asynchronously.

public DataStream GetData(Asynchronous data, AsynchronousFlags flags)

Parameters

data Asynchronous

The asynchronous data provider.

flags AsynchronousFlags

Flags specifying how the command should operate.

Returns

DataStream

The data retrieved from the GPU.

GetData(Asynchronous)

Gets data from the GPU asynchronously.

public DataStream GetData(Asynchronous data)

Parameters

data Asynchronous

The asynchronous data provider.

Returns

DataStream

The data retrieved from the GPU.

GetData<T>(Asynchronous, out T)

Gets data from the GPU asynchronously.

public bool GetData<T>(Asynchronous data, out T result) where T : struct

Parameters

data Asynchronous

The asynchronous data provider.

result T

The data retrieved from the GPU.

Returns

bool

True if result contains valid data, false otherwise.

Type Parameters

T

GetData<T>(Asynchronous, AsynchronousFlags, out T)

Gets data from the GPU asynchronously.

public bool GetData<T>(Asynchronous data, AsynchronousFlags flags, out T result) where T : struct

Parameters

data Asynchronous

The asynchronous data provider.

flags AsynchronousFlags

Flags specifying how the command should operate.

result T

The data retrieved from the GPU.

Returns

bool

True if result contains valid data, false otherwise.

Type Parameters

T

GetData<T>(Asynchronous, AsynchronousFlags)

Gets data from the GPU asynchronously.

public T GetData<T>(Asynchronous data, AsynchronousFlags flags) where T : struct

Parameters

data Asynchronous

The asynchronous data provider.

flags AsynchronousFlags

Flags specifying how the command should operate.

Returns

T

The data retrieved from the GPU.

Type Parameters

T

GetData<T>(Asynchronous)

Gets data from the GPU asynchronously.

public T GetData<T>(Asynchronous data) where T : struct

Parameters

data Asynchronous

The asynchronous data provider.

Returns

T

The data retrieved from the GPU.

Type Parameters

T

GetDataInternal(Asynchronous, IntPtr, int, AsynchronousFlags)

HRESULT ID3D11DeviceContext::GetData([In] ID3D11Asynchronous* pAsync,[Out, Buffer, Optional] void* pData,[In] unsigned int DataSize,[In] D3D11_ASYNC_GETDATA_FLAG GetDataFlags)

public HResult GetDataInternal(Asynchronous asyncRef, IntPtr dataRef, int dataSize, AsynchronousFlags getDataFlags)

Parameters

asyncRef Asynchronous
dataRef System.IntPtr
dataSize int
getDataFlags AsynchronousFlags

Returns

HResult

GetMinimumLod(Resource)

float ID3D11DeviceContext::GetResourceMinLOD([In] ID3D11Resource* pResource)

public float GetMinimumLod(Resource resourceRef)

Parameters

resourceRef Resource

Returns

float

GetPredication(out Bool)

void ID3D11DeviceContext::GetPredication([Out, Optional] ID3D11Predicate** ppPredicate,[Out, Optional] BOOL* pPredicateValue)

public Predicate GetPredication(out Bool predicateValueRef)

Parameters

predicateValueRef Bool

Returns

Predicate

GetTypeInfo()

D3D11_DEVICE_CONTEXT_TYPE ID3D11DeviceContext::GetType()

public DeviceContextType GetTypeInfo()

Returns

DeviceContextType

IsDataAvailable(Asynchronous, AsynchronousFlags)

Determines whether asynchronous query data is available.

public bool IsDataAvailable(Asynchronous data, AsynchronousFlags flags)

Parameters

data Asynchronous

The data.

flags AsynchronousFlags

Optional flags

Returns

bool

true if asynchronous query data is available; otherwise, false.

IsDataAvailable(Asynchronous)

Determines whether asynchronous query data is available.

public bool IsDataAvailable(Asynchronous data)

Parameters

data Asynchronous

The data.

Returns

bool

true if asynchronous query data is available; otherwise, false.

MapSubresource(Buffer, MapMode, MapFlags, out DataStream)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Buffer resource, MapMode mode, MapFlags flags, out DataStream stream)

Parameters

resource Buffer

The resource.

mode MapMode

The mode.

flags MapFlags

The flags.

stream DataStream

The output stream containing the pointer.

Returns

DataBox

The locked DataBox

MapSubresource(Resource, int, MapMode, MapFlags, out DataBox)

HRESULT ID3D11DeviceContext::Map([In] ID3D11Resource* pResource,[In] unsigned int Subresource,[In] D3D11_MAP MapType,[In] D3D11_MAP_FLAG MapFlags,[Out] D3D11_MAPPED_SUBRESOURCE* pMappedResource)

public HResult MapSubresource(Resource resourceRef, int subresource, MapMode mapType, MapFlags mapFlags, out DataBox mappedResourceRef)

Parameters

resourceRef Resource
subresource int
mapType MapMode
mapFlags MapFlags
mappedResourceRef DataBox

Returns

HResult

MapSubresource(Resource, int, MapMode, MapFlags, out DataStream)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Resource resource, int subresource, MapMode mode, MapFlags flags, out DataStream stream)

Parameters

resource Resource

The resource.

subresource int

The subresource.

mode MapMode

The mode.

flags MapFlags

The flags.

stream DataStream

The output stream containing the pointer.

Returns

DataBox

The locked DataBox

MapSubresource(Resource, int, MapMode, MapFlags)

Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.

public DataBox MapSubresource(Resource resourceRef, int subresource, MapMode mapType, MapFlags mapFlags)

Parameters

resourceRef Resource

A reference to a Resource interface.

subresource int

Index number of the subresource.

mapType MapMode

Specifies the CPU's read and write permissions for a resource. For possible values, see MapMode.

mapFlags MapFlags

Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

Returns

DataBox

The mapped subresource (see DataBox). If DoNotWait is used and the resource is still being used by the GPU, this method return an empty DataBox whose property IsEmpty returns true.

MapSubresource(Resource, int, int, MapMode, MapFlags, out int)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Resource resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out int mipSize)

Parameters

resource Resource

The resource.

mipSlice int

The mip slice.

arraySlice int

The array slice.

mode MapMode

The mode.

flags MapFlags

The flags.

mipSize int

Size of the selected miplevel.

Returns

DataBox

The locked DataBox

MapSubresource(Texture1D, int, int, MapMode, MapFlags, out DataStream)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Texture1D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)

Parameters

resource Texture1D

The resource.

mipSlice int

The mip slice.

arraySlice int

The array slice.

mode MapMode

The mode.

flags MapFlags

The flags.

stream DataStream

The output stream containing the pointer.

Returns

DataBox

The locked DataBox

MapSubresource(Texture2D, int, int, MapMode, MapFlags, out DataStream)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Texture2D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)

Parameters

resource Texture2D

The resource.

mipSlice int

The mip slice.

arraySlice int

The array slice.

mode MapMode

The mode.

flags MapFlags

The flags.

stream DataStream

The output stream containing the pointer.

Returns

DataBox

The locked DataBox

MapSubresource(Texture3D, int, int, MapMode, MapFlags, out DataStream)

Maps the data contained in a subresource to a memory pointer, and denies the GPU access to that subresource.

public DataBox MapSubresource(Texture3D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)

Parameters

resource Texture3D

The resource.

mipSlice int

The mip slice.

arraySlice int

The array slice.

mode MapMode

The mode.

flags MapFlags

The flags.

stream DataStream

The output stream containing the pointer.

Returns

DataBox

The locked DataBox

NativePointerUpdated(IntPtr)

Method called when the NativePointer is updated.

protected override void NativePointerUpdated(IntPtr oldPointer)

Parameters

oldPointer System.IntPtr

ResolveSubresource_(Resource, int, Resource, int, Format)

void ID3D11DeviceContext::ResolveSubresource([In] ID3D11Resource* pDstResource,[In] unsigned int DstSubresource,[In] ID3D11Resource* pSrcResource,[In] unsigned int SrcSubresource,[In] DXGI_FORMAT Format)

public void ResolveSubresource_(Resource dstResourceRef, int dstSubresource, Resource srcResourceRef, int srcSubresource, Format format)

Parameters

dstResourceRef Resource
dstSubresource int
srcResourceRef Resource
srcSubresource int
format Format

ResolveSubresource(Resource, int, Resource, int, Format)

Copy a multisampled resource into a non-multisampled resource.

public void ResolveSubresource(Resource source, int sourceSubresource, Resource destination, int destinationSubresource, Format format)

Parameters

source Resource

Source resource. Must be multisampled.

sourceSubresource int

The source subresource of the source resource.

destination Resource

Destination resource. Must be a created with the Default flag and be single-sampled. See Resource.

destinationSubresource int

A zero-based index, that identifies the destination subresource. Use {{D3D11CalcSubresource}} to calculate the index.

format Format

A Format that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks.

SetMinimumLod(Resource, float)

void ID3D11DeviceContext::SetResourceMinLOD([In] ID3D11Resource* pResource,[In] float MinLOD)

public void SetMinimumLod(Resource resourceRef, float minLOD)

Parameters

resourceRef Resource
minLOD float

SetPredication(Predicate, Bool)

void ID3D11DeviceContext::SetPredication([In, Optional] ID3D11Predicate* pPredicate,[In] BOOL PredicateValue)

public void SetPredication(Predicate predicateRef, Bool predicateValue)

Parameters

predicateRef Predicate
predicateValue Bool

UnmapSubresource(Resource, int)

void ID3D11DeviceContext::Unmap([In] ID3D11Resource* pResource,[In] unsigned int Subresource)

public void UnmapSubresource(Resource resourceRef, int subresource)

Parameters

resourceRef Resource
subresource int

UpdateSubresource(DataBox, Resource, int, ResourceRegion)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresource(DataBox source, Resource resource, int subresource, ResourceRegion region)

Parameters

source DataBox

The source data.

resource Resource

The destination resource.

subresource int

The destination subresource.

region ResourceRegion

The destination region within the resource.

UpdateSubresource(DataBox, Resource, int)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresource(DataBox source, Resource resource, int subresource = 0)

Parameters

source DataBox

The source data.

resource Resource

The destination resource.

subresource int

The destination subresource.

UpdateSubresource(Resource, int, ResourceRegion?, IntPtr, int, int)

void ID3D11DeviceContext::UpdateSubresource([In] ID3D11Resource* pDstResource,[In] unsigned int DstSubresource,[In, Optional] const D3D11_BOX* pDstBox,[In] const void* pSrcData,[In] unsigned int SrcRowPitch,[In] unsigned int SrcDepthPitch)

public void UpdateSubresource(Resource dstResourceRef, int dstSubresource, ResourceRegion? dstBoxRef, IntPtr srcDataRef, int srcRowPitch, int srcDepthPitch)

Parameters

dstResourceRef Resource
dstSubresource int
dstBoxRef ResourceRegion?
srcDataRef System.IntPtr
srcRowPitch int
srcDepthPitch int

UpdateSubresource<T>(T[], Resource, int, int, int, ResourceRegion?)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresource<T>(T[] data, Resource resource, int subresource = 0, int rowPitch = 0, int depthPitch = 0, ResourceRegion? region = null) where T : struct

Parameters

data T[]

A reference to the data to upload.

resource Resource

The destination resource.

subresource int

The destination subresource.

rowPitch int

The row pitch.

depthPitch int

The depth pitch.

region ResourceRegion?

A region 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.

Type Parameters

T

Type of the data to upload

UpdateSubresource<T>(ref T, Resource, int, int, int, ResourceRegion?)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresource<T>(ref T data, Resource resource, int subresource = 0, int rowPitch = 0, int depthPitch = 0, ResourceRegion? region = null) where T : struct

Parameters

data T

A reference to the data to upload.

resource Resource

The destination resource.

subresource int

The destination subresource.

rowPitch int

The row pitch.

depthPitch int

The depth pitch.

region ResourceRegion?

The region

Type Parameters

T

Type of the data to upload

UpdateSubresourceSafe(DataBox, Resource, int, int, ResourceRegion, bool)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresourceSafe(DataBox source, Resource resource, int srcBytesPerElement, int subresource, ResourceRegion region, bool isCompressedResource = false)

Parameters

source DataBox

The source data.

resource Resource

The destination resource.

srcBytesPerElement int

The size in bytes per pixel/block element.

subresource int

The destination subresource.

region ResourceRegion

The destination region within the resource.

isCompressedResource bool

if set to true the resource is a block/compressed resource

UpdateSubresourceSafe(DataBox, Resource, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresourceSafe(DataBox source, Resource resource, int srcBytesPerElement, int subresource = 0, bool isCompressedResource = false)

Parameters

source DataBox

The source data.

resource Resource

The destination resource.

srcBytesPerElement int

The size in bytes per pixel/block element.

subresource int

The destination subresource.

isCompressedResource bool

if set to true the resource is a block/compressed resource

UpdateSubresourceSafe<T>(T[], Resource, int, int, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresourceSafe<T>(T[] data, Resource resource, int srcBytesPerElement, int subresource = 0, int rowPitch = 0, int depthPitch = 0, bool isCompressedResource = false) where T : struct

Parameters

data T[]

A reference to the data to upload.

resource Resource

The destination resource.

srcBytesPerElement int

The size in bytes per pixel/block element.

subresource int

The destination subresource.

rowPitch int

The row pitch.

depthPitch int

The depth pitch.

isCompressedResource bool

if set to true the resource is a block/compressed resource

Type Parameters

T

Type of the data to upload

UpdateSubresourceSafe<T>(ref T, Resource, int, int, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

public void UpdateSubresourceSafe<T>(ref T data, Resource resource, int srcBytesPerElement, int subresource = 0, int rowPitch = 0, int depthPitch = 0, bool isCompressedResource = false) where T : struct

Parameters

data T

A reference to the data to upload.

resource Resource

The destination resource.

srcBytesPerElement int

The size in bytes per pixel/block element.

subresource int

The destination subresource.

rowPitch int

The row pitch.

depthPitch int

The depth pitch.

isCompressedResource bool

if set to true the resource is a block/compressed resource

Type Parameters

T

Type of the data to upload

Operators

explicit operator DeviceContext(IntPtr)

Performs an explicit conversion from System.IntPtr to DeviceContext.

public static explicit operator DeviceContext(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

DeviceContext