ID3D10Device::CreateTexture3D method (d3d10.h)
Create a single 3D texture (see Texture3D).
HRESULT CreateTexture3D(
[in] const D3D10_TEXTURE3D_DESC *pDesc,
[in] const D3D10_SUBRESOURCE_DATA *pInitialData,
[out] ID3D10Texture3D **ppTexture3D
);
[in] pDesc
Type: const D3D10_TEXTURE3D_DESC*
Pointer to a 3D texture description (see D3D10_TEXTURE3D_DESC). To create a typeless resource that can be interpreted at runtime into different, compatible formats, specify a typeless format in the texture description. To generate mipmap levels automatically, set the number of mipmap levels to 0.
[in] pInitialData
Type: const D3D10_SUBRESOURCE_DATA*
Pointer to an array of subresource descriptions (see D3D10_SUBRESOURCE_DATA); one for each subresource (ordered by texture array index, then slice index, then mip level). Applications may not specify NULL for pInitialData when creating IMMUTABLE resources (see D3D10_USAGE). If the resource is multisampled, pInitialData must be NULL because multisampled resources cannot be initialized with data when they are created.
[out] ppTexture3D
Type: ID3D10Texture3D**
Address of a pointer to the created texture (see ID3D10Texture3D Interface). Set this parameter to NULL to validate the other input parameters (the method will return S_FALSE if the other input parameters pass validation).
Type: HRESULT
If the method succeeds, the return code is S_OK. See Direct3D 10 Return Codes for failing error codes.
CreateTexture3D creates a 3D texture resource, which contains an array of 1D textures. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.
All resources are made up of one or more subresources. To load data into the texture, applications may supply the data initially as part of D3D10_SUBRESOURCE_DATA structure pointed to by pInitialData, or it may use one of the Texturing Functions supplied by the SDK.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d10.h |
Library | D3D10.lib |