Microsoft DirectX 8.1 (Visual Basic)

D3DX8.CreateVolumeTexture

Creates an empty volume texture, adjusting the calling parameters as necessary.

object.CreateVolumeTexture( _ 
    Device As Direct3DDevice8, _ 
    Width As Long, _ 
    Height As Long, _ 
    Depth As Long, _ 
    MipLevels As Long, _ 
    Usage As Long, _ 
    PixelFormat As CONST_D3DFORMAT, _ 
    Pool As CONST_D3DPOOL) As Direct3DVolume8

Parts

object
Object expression that resolves to a D3DX8 object.
Device
Direct3DDevice8 object representing the device to be associated with the volume.
Width
Width in pixels. This value must be nonzero.
Height
Height in pixels. This value must be nonzero.
Depth
Depth in pixels. This value must be nonzero.
MipLevels
Number of mip levels requested. If this value is zero or D3DX_DEFAULT, a complete mipmap chain is created.
Usage
Currently not used, set to 0.
PixelFormat
Member of the CONST_D3DFORMAT enumeration, describing the requested pixel format for the volume texture. The returned volume texture might have a format different from that specified by Format. Applications should check the format of the returned volume texture.
Pool
Member of the CONST_D3DPOOL enumeration, describing the memory class into which the volume texture should be placed.

Return Values

Direct3DVolume8 object representing the created volume texture object.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DERR_NOTAVAILABLE
D3DERR_OUTOFVIDEOMEMORY
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

Internally, D3DX8.CreateVolumeTexture uses D3DX8.CheckVolumeTextureRequirements to adjust the calling parameters. Therefore, calls to D3DX8.CreateVolumeTexture often succeed where calls to Direct3DDevice8.CreateVolumeTexture fail.