D3D10CalcSubresource function (d3d10.h)
Calculate a subresource index for a texture.
Syntax
UINT D3D10CalcSubresource(
[in] UINT MipSlice,
[in] UINT ArraySlice,
[in] UINT MipLevels
);
Parameters
[in] MipSlice
Type: UINT
A zero-based index into an array of subtextures; 0 indicates the first, most detailed subtexture (or mipmap level).
[in] ArraySlice
Type: UINT
The zero-based index of the first texture to use (in an array of textures).
[in] MipLevels
Type: UINT
Number of mipmap levels (or subtextures) to use.
Return value
Type: inline UINT
The index which equals MipSlice + (ArraySlice * MipLevels).
Remarks
A buffer is an unstructured resource and is therefore defined as containing a single subresource. APIs that take buffers do not need a subresource index. A texture on the other hand is highly structured. Each texture object may contain one or more subresources depending on the size of the array and the number of mipmap levels.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d10.h |
Library | D3D10.lib |
DLL | D3D10.dll |