[]
        
(Showing Draft Content)

C1.Util.DX.Direct3D11.DeviceContext.MapSubresource

MapSubresource Method

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.

Declaration
public DataBox MapSubresource(Texture1D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)
Parameters
Type Name Description
Texture1D resource

The resource.

int mipSlice

The mip slice.

int arraySlice

The array slice.

MapMode mode

The mode.

MapFlags flags

The flags.

DataStream stream

The output stream containing the pointer.

Returns
Type Description
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.

Declaration
public DataBox MapSubresource(Texture2D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)
Parameters
Type Name Description
Texture2D resource

The resource.

int mipSlice

The mip slice.

int arraySlice

The array slice.

MapMode mode

The mode.

MapFlags flags

The flags.

DataStream stream

The output stream containing the pointer.

Returns
Type Description
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.

Declaration
public DataBox MapSubresource(Texture3D resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out DataStream stream)
Parameters
Type Name Description
Texture3D resource

The resource.

int mipSlice

The mip slice.

int arraySlice

The array slice.

MapMode mode

The mode.

MapFlags flags

The flags.

DataStream stream

The output stream containing the pointer.

Returns
Type Description
DataBox

The locked DataBox

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.

Declaration
public DataBox MapSubresource(Buffer resource, MapMode mode, MapFlags flags, out DataStream stream)
Parameters
Type Name Description
Buffer resource

The resource.

MapMode mode

The mode.

MapFlags flags

The flags.

DataStream stream

The output stream containing the pointer.

Returns
Type Description
DataBox

The locked DataBox

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.

Declaration
public DataBox MapSubresource(Resource resource, int mipSlice, int arraySlice, MapMode mode, MapFlags flags, out int mipSize)
Parameters
Type Name Description
Resource resource

The resource.

int mipSlice

The mip slice.

int arraySlice

The array slice.

MapMode mode

The mode.

MapFlags flags

The flags.

int mipSize

Size of the selected miplevel.

Returns
Type Description
DataBox

The locked DataBox

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.

Declaration
public DataBox MapSubresource(Resource resource, int subresource, MapMode mode, MapFlags flags, out DataStream stream)
Parameters
Type Name Description
Resource resource

The resource.

int subresource

The subresource.

MapMode mode

The mode.

MapFlags flags

The flags.

DataStream stream

The output stream containing the pointer.

Returns
Type Description
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.

Declaration
public DataBox MapSubresource(Resource resourceRef, int subresource, MapMode mapType, MapFlags mapFlags)
Parameters
Type Name Description
Resource resourceRef

A reference to a Resource interface.

int subresource

Index number of the subresource.

MapMode mapType

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
Type Description
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, 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)

Declaration
public HResult MapSubresource(Resource resourceRef, int subresource, MapMode mapType, MapFlags mapFlags, out DataBox mappedResourceRef)
Parameters
Type Name Description
Resource resourceRef
int subresource
MapMode mapType
MapFlags mapFlags
DataBox mappedResourceRef
Returns
Type Description
HResult