Microsoft DirectX 9.0

Other Direct3D Extensions (D3DX)

Direct3D extensions (D3DX) is a utility library that provides helper services. It is a layer above the Microsoft?Direct3D?component.

The Microsoft DirectX?7.0  software development kit (SDK) started with texture and math support to help initialize resources. With the DirectX 8.0 SDK, the simplified Direct3D initialization was largely modeled on the D3DX context initialization support. Since then, the library has been expanded to become a suite of advanced functionality, with support for meshes, shaders, effects, math, and texture mapping support.

D3DX provides extensive support for basic needs like math, texturing, and shader manipulation, as well as advanced support like effect files and meshes. There is even general purpose utility support for matrix stacks, simple shapes, and error handling.


Many different textures are supported in the following topics.


When using any of the D3DXLoadSurfacexxx, D3DXLoadVolumexxx, D3DXCreateTexturexxx, D3DXCreateCubeTexturexxx, or D3DXCreateVolumeTexturexxx functions, color conversion might need to be performed. For example, one surface might be type RGBA and the other might be UVWQ. For cases of dissimilar formats, the conversion sequence is as follows:

Mapping RGBA_to_UVWQ(L)

A->Q or A->L

Mapping UV to RGBA

If a channel does not exist in the source, it is assumed to be 1 (with the exception of A8, where R,G,B are assumed to be 0). For example:

U -> R
V -> G
1 -> B
1 -> A


Math support, contained in a set of functions, is provided for:

It is worth noting here that when coupled with the C++ overloads, the support for basic 3-D math types is extensive.

For more information about these functions, see Functions. To help find the function you need, they are broken up in several folders.


When using the FLOAT16 data type, be sure to limit values to a maximum of D3DX_16F_MAX. Any FLOAT16 value that exceeds this will result in undefined behavior in the pipeline. See Other Direct3D Extentions (D3DX) Constants.


These are the D3DX functions that did not fit into one of the earlier categories.

© 2002 Microsoft Corporation. All rights reserved.