ID3D11Device3::CreateShaderResourceView1 method
Creates a shader-resource view for accessing data in a resource.
Syntax
HRESULT CreateShaderResourceView1( [in] ID3D11Resource *pResource, [in, optional] const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1, [out, optional] ID3D11ShaderResourceView1 **ppSRView1 );
Parameters
- pResource [in]
-
Type: ID3D11Resource*
Pointer to the resource that will serve as input to a shader. This resource must have been created with the D3D11_BIND_SHADER_RESOURCE flag.
- pDesc1 [in, optional]
-
Type: const D3D11_SHADER_RESOURCE_VIEW_DESC1*
A pointer to a D3D11_SHADER_RESOURCE_VIEW_DESC1 structure that describes a shader-resource view. Set this parameter to NULL to create a view that accesses the entire resource (using the format the resource was created with).
- ppSRView1 [out, optional]
-
Type: ID3D11ShaderResourceView1**
A pointer to a memory block that receives a pointer to a ID3D11ShaderResourceView1 interface for the created shader-resource view. Set this parameter to NULL to validate the other input parameters (the method will return S_FALSE if the other input parameters pass validation).
Return value
Type: HRESULT
This method returns E_OUTOFMEMORY if there is insufficient memory to create the shader-resource view. See Direct3D 11 Return Codes for other possible return values.
Requirements
|
Minimum supported client |
Windows 10 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
|
Library |
|
See also