ComponentOne Bitmap for UWP
MapSubresource(Resource,Int32,MapMode,MapFlags) Method

C1.UWP.DX Assembly > C1.Util.DX.Direct3D11 Namespace > DeviceContext Class > MapSubresource Method : MapSubresource(Resource,Int32,MapMode,MapFlags) Method
A reference to a Resource interface.
Index number of the subresource.
Specifies the CPU's read and write permissions for a resource. For possible values, see MapMode.
Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.
Gets a reference to the data contained in a subresource, and denies the GPU access to that subresource.
Syntax
'Declaration
 
Public Overloads Function MapSubresource( _
   ByVal resourceRef As Resource, _
   ByVal subresource As System.Integer, _
   ByVal mapType As MapMode, _
   ByVal mapFlags As MapFlags _
) As DataBox
public DataBox MapSubresource( 
   Resource resourceRef,
   System.int subresource,
   MapMode mapType,
   MapFlags mapFlags
)

Parameters

resourceRef
A reference to a Resource interface.
subresource
Index number of the subresource.
mapType
Specifies the CPU's read and write permissions for a resource. For possible values, see MapMode.
mapFlags
Flag that specifies what the CPU should do when the GPU is busy. This flag is optional.

Return Value

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

Reference

DeviceContext Class
DeviceContext Members
Overload List