Discards a resource from the device context.
public:
void DiscardResource(
ID3D11Resource *pResource
)
pResource
Type: ID3D11Resource *
[in] A pointer to the ID3D11Resource interface for the resource to discard. The resource must have been created with usage D3D11_USAGE_DEFAULT or D3D11_USAGE_DYNAMIC, otherwise the runtime drops the call to DiscardResource; if the debug layer is enabled, the runtime returns an error message.
DiscardResource informs the graphics processing unit (GPU) that the existing content in the resource that pResource points to is no longer needed.
Header: Declared in d3d11_x.h (d3d11_1.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).