ID3D11DeviceContext::GenerateMips Method
Generate mipmaps for the given shader resource.
Syntax
void GenerateMips(
[in] ID3D11ShaderResourceView *pShaderResourceView
);
Parameter
pShaderResourceView [in]
Typ: ID3D11ShaderResourceView*Pointer to an ID3D11ShaderResourceView interface that represents the shader resource.
Rückgabewert
Returns nothing.
Hinweise
GenerateMips may be called on any shader-resource view in order to generate the lower mipmap levels. GenerateMips uses the largest mipmap level of the view to recursively generate the lower levels of the mip, stopping with the smallest level specified by the view. If the base resource was not created with D3D11_BIND_RENDER_TARGET and D3D11_RESOURCE_MISC_GENERATE_MIPS, this call has no effect.
All video adapters support generating mipmaps if you are using any of the following formats:
DXGI_FORMAT_A8_UNORM
DXGI_FORMAT_R10G10B10A2_UNORM
DXGI_FORMAT_R11G11B10_FLOAT
DXGI_FORMAT_R16_FLOAT
DXGI_FORMAT_R16_SNORM
DXGI_FORMAT_R16_UNORM
DXGI_FORMAT_R16G16_FLOAT
DXGI_FORMAT_R16G16_SNORM
DXGI_FORMAT_R16G16_UNORM
DXGI_FORMAT_R16G16B16A16_FLOAT
DXGI_FORMAT_R16G16B16A16_SNORM
DXGI_FORMAT_R16G16B16A16_UNORM
DXGI_FORMAT_R32_FLOAT
DXGI_FORMAT_R32G32_FLOAT
DXGI_FORMAT_R32G32B32A32_FLOAT
DXGI_FORMAT_R8_SNORM
DXGI_FORMAT_R8_UNORM
DXGI_FORMAT_R8G8_SNORM
DXGI_FORMAT_R8G8_UNORM
DXGI_FORMAT_R8G8B8A8_SNORM
DXGI_FORMAT_R8G8B8A8_UNORM
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
Some video adapters support generating mipmaps if you are using this format:
DXGI_FORMAT_R32G32B32_FLOAT
For all other unsupported formats, this method will silently fail.
Anforderungen
Header |
D3D11.h |
Bibliothek |
D3D11.lib |