Direct3DDevice8.CreateVolumeTexture
Creates a volume texture resource.
object.CreateVolumeTexture( _
Width As Long, _
Height As Long, _
Depth As Long, _
Levels As Long, _
Usage As Long, _
Format As CONST_D3DFORMAT, _
Pool As CONST_D3DPOOL) As Direct3DVolumeTexture8
Parts
- object
- Object expression that resolves to a Direct3DDevice8 object.
- Width
- 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 2 results in 0, 1 will be taken instead.
- Height
- 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, 1 will be taken instead.
- Depth
- 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, 1 will be taken instead.
- Levels
- The number of levels in the volume texture. If this is 0 (zero), Microsoft® Direct3D® will generate all texture sub-levels down to 1×1×1 pixels for hardware that supports mipmapped volume textures. Otherwise, it will create one level. Call Direct3DBaseTexture8.GetLevelCount to see the number of levels generated.
- Usage
- Currently not used, set to 0.
- Format
- Member of the CONST_D3DFORMAT enumeration, describing the format of all levels in the volume texture.
- Pool
- Member of the CONST_D3DPOOL enumeration, describing the memory class into which the volume texture should be placed.
Return Values
A Direct3DVolumeTexture8 object, representing the created volume texture resource.
Error Codes
If the method fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.