ID3D11DeviceContext::Map Method
Get a pointer to the data contained in a subresource, and deny the GPU access to that subresource.
Syntax
HRESULT Map(
ID3D11Resource *pResource,
UINT Subresource,
D3D11_MAP MapType,
UINT MapFlags,
D3D11_MAPPED_SUBRESOURCE *pMappedResource
);
Parameter
pResource
Typ: ID3D11Resource*A pointer to a ID3D11Resource interface.
Subresource
Typ: UINTIndex number of the subresource.
MapType
Typ: D3D11_MAPSpecifies the CPU's read and write permissions for a resource. For possible values, see D3D11_MAP.
MapFlags
Typ: UINTFlag that specifies what the CPU should do when the GPU is busy. This flag is optional.
pMappedResource
Typ: D3D11_MAPPED_SUBRESOURCE*A pointer to the mapped subresource (see D3D11_MAPPED_SUBRESOURCE).
Rückgabewert
Typ: HRESULT
This method returns one of the Direct3D 11 Return Codes.
This method also returns DXGI_ERROR_WAS_STILL_DRAWING if MapFlags specifies D3D10_MAP_FLAG_DO_NOT_WAIT and the GPU is not yet finished with the resource.
This method also returns DXGI_ERROR_DEVICE_REMOVED if MapType allows any CPU read access and the video card has been removed.
For more information about these error codes, see DXGI_ERROR.
Hinweise
If you call Map on a deferred context, you can only pass D3D11_MAP_WRITE_DISCARD, D3D11_MAP_WRITE_NO_OVERWRITE, or both to the MapType parameter. Other D3D11_MAP-typed values are not supported for a deferred context.
Anforderungen
Header |
D3D11.h |
Bibliothek |
D3D11.lib |