|Microsoft DirectX 9.0|
Creates an empty volume texture, adjusting the calling parameters as needed.
LPDIRECT3DDEVICE9 pDevice, UINT Width, UINT Height, UINT Depth, UINT MipLevels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, LPDIRECT3DVOLUMETEXTURE9 *ppVolumeTexture );
- [in] Pointer to an IDirect3DDevice9 interface, representing the device to be associated with the volume texture.
- [in] Width in pixels. This value must be nonzero.
- [in] Height in pixels. This value must be nonzero.
- [in] Depth in pixels. This value must be nonzero.
- [in] Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
- [in] 0 or D3DUSAGE_DYNAMIC. For more information about using dynamic textures, see Using Dynamic Textures.
- [in] Member of the D3DFORMAT enumerated type, describing the requested pixel format for the volume texture. The returned volume texture might have a different format from that specified by Format. Applications should check the format of the returned volume texture.
- [in] Member of the D3DPOOL enumerated type, describing the memory class into which the volume texture should be placed.
- [out] Address of a pointer to an IDirect3DVolumeTexture9 interface, representing the created volume texture object.
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one of the following values.
D3DERR_NOTAVAILABLE This device does not support the queried technique. D3DERR_OUTOFVIDEOMEMORY Microsoft?Direct3D?does not have enough display memory to perform the operation. D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Direct3D could not allocate sufficient memory to complete the call.
Internally, D3DXCreateVolumeTexture uses D3DXCheckVolumeTextureRequirements to adjust the calling parameters. Therefore, calls to D3DXCreateVolumeTexture will often succeed where calls to IDirect3DDevice9::CreateVolumeTexture would fail.
Header d3dx9tex.h Import library d3dx9.lib Minimum operating systems Windows 98