Texture Support in D3DX

D3DX is a utility library that provides helper services. It is a layer above the Direct3D component.

Textures

Many different textures are supported in the following topics.

Texture Color Conversion

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

R->U
G->V
B->W
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