以下是该结构体的定义:
typedef struct CD3D11_SHADER_RESOURCE_VIEW_DESC1 : public D3D11_SHADER_RESOURCE_VIEW_DESC1
{
CD3D11_SHADER_RESOURCE_VIEW_DESC1();
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(const D3D11_SHADER_RESOURCE_VIEW_DESC1& o);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(CD3D11_DEFAULT);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(
D3D11_SRV_DIMENSION viewDimension,
DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
UINT mostDetailedMip = 0,
UINT mipLevels = -1,
UINT firstArraySlice = 0,
UINT arraySize = -1,
UINT flags = 0,
UINT planeSlice = 0
);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(
_In_ ID3D11Resource* pResource,
D3D11_SRV_DIMENSION viewDimension,
DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
UINT mostDetailedMip = 0,
UINT mipLevels = -1,
UINT firstArraySlice = 0,
UINT arraySize = -1,
UINT flags = 0,
UINT planeSlice = 0
);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(
_In_ ID3D11Resource* pResource,
D3D11_SRV_DIMENSION viewDimension,
DXGI_FORMAT format,
UINT arraySize,
UINT flags = 0,
UINT planeSlice = 0
);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(
_In_ ID3D11Resource* pResource,
DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,
UINT mostDetailedMip = 0,
UINT mipLevels = -1,
UINT flags = 0,
UINT planeSlice = 0
);
explicit CD3D11_SHADER_RESOURCE_VIEW_DESC1(
_In_ ID3D11Resource* pResource,
DXGI_FORMAT format,
UINT mostDetailedMip = 0,
UINT mipLevels = -1,
UINT flags = 0,
UINT planeSlice = 0
);
} CD3D11_SHADER_RESOURCE_VIEW_DESC1;
这个结构体同样提供了一些方便的构造函数,用于初始化不同类型的着色器资源视图描述。你可以使用这个结构体创建着色器资源视图,并将其传递给相应的 Direct3D 11 API 函数。
转载请注明出处:http://www.zyzy.cn/article/detail/25845/Win32 API/D3d11_3.h/CD3D11_SHADER_RESOURCE_VIEW_DESC1