Table of contents
Collapse the table of content
Expand the table of content

Reporting Support for Volume Textures

Last Updated: 2/14/2017

DirectX 8.0 introduces two new primitive texture capabilities flags that the driver sets to indicate support for volume textures. These flags are D3DPTEXTURECAPS_VOLUMEMAP and D3DPTEXTURECAPS_MIPVOLUMEMAP. D3DPTEXTURECAPS_VOLUMEMAP should be set in the dwTextureCaps field of the D3DPRIMCAPS8 structure (part of D3DCAPS8) if the hardware has support for volume textures. D3DPTEXTURECAPS_MIPVOLUMEMAP indicates that the driver supports MIP mapped volume textures.

Hardware that supports volume textures must also support the use of volume textures in multitexturing scenarios (in combination with other volume textures or 2D textures). If this scenario is not supported by the hardware, the driver cannot set D3DPTEXTURECAPS_VOLUMEMAP.

The driver can indicate that it requires the dimensions of the volume texture to be a power of 2 by setting the primitive texture capability D3DPTEXTURECAPS_VOLUMEMAP_POW2.

A driver that supports volume textures is also required to specify the minimum and maximum volume texture dimensions that it supports. The field MaxVolumeExtent should be set to the maximum supported dimensions of the volume texture. The same constraint must apply to all three dimensions of the volume texture (width, height and depth).

A driver notifies the runtime of the volume texture filtering and texture addressing modes supported by the hardware by setting the VolumeTextureFilterCaps and VolumeTextureAddressCaps to the appropriate combinations of flags.

Finally, the driver notifies the runtime about what surface formats can be used with volume textures by setting the D3DFORMAT_OP_VOLUMETEXTURE in the dwOperations field of the surface format's DDPIXELFORMAT.

Send comments about this topic to Microsoft

© 2017 Microsoft