IDirect3DDevice8::CreateVolumeTexture
Creates a volume texture resource.
HRESULT CreateVolumeTexture(
  UINT Width,
  UINT Height,
  UINT Depth,
  UINT Levels,
  DWORD Usage,
  D3DFORMAT Format,
  D3DPOOL Pool,
  IDirect3DVolumeTexture8** ppVolumeTexture
);
Parameters
- Width
 
- [in] Width of the top-level of the volume texture, in pixels. This value must be a power of two. The pixel dimensions of subsequent levels will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by two results in 0 (zero), 1 will be taken instead.
 
- Height
 
- [in] Height of the top-level of the volume texture, in pixels. This value must be a power of two. The pixel dimensions of subsequent levels will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by 2 results in 0 (zero), 1 will be taken instead.
 
- Depth
 
- [in] Depth of the top-level of the volume texture, in pixels. This value must be a power of two. The pixel dimensions of subsequent levels will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension clamps at a size of 1 pixel. Thus, if the division by 2 results in 0 (zero), 1 will be taken instead.
 
- Levels
 
- [in] The number of levels in the texture. If this is zero, Microsoft® Direct3D® will generate all texture sublevels down to 1×1×1 pixels for hardware that supports mipmapped volume textures. Otherwise, it will create one level. Call IDirect3DBaseTexture8::GetLevelCount to see the number of levels generated.
 
- Usage
 
- [in] Currently not used, set to 0.
 
- Format
 
- [in] Member of the D3DFORMAT enumerated type, describing the format of all levels in the volume texture.
 
- Pool
 
- [in] Member of the D3DPOOL enumerated type, describing the memory class into which the volume texture should be placed.
 
- ppVolumeTexture
 
- [out, retval] Address of a pointer to an IDirect3DVolumeTexture8 interface, representing the created volume texture resource.
 
Return Values
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
Requirements
  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.