In computing, D3DX (Direct3D Extension) is a high level API library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D 7, and subsequently was improved in Direct3D 9. It provides classes for common calculations on vectors, matrices and colors, calculating look-at and projection matrices, spline interpolations, and several more complicated tasks, such as compiling or assembling shaders used for 3D graphic programming, compressed skeletal animation storage and matrix stacks. There are several functions that provide complex operations over 3D meshes like tangent-space computation, mesh simplification, precomputed radiance transfer, optimizing for vertex cache friendliness and strip reordering, and generators for 3D text meshes. 2D features include classes for drawing screen-space lines, text and sprite based particle systems. Spatial functions include various intersection routines, conversion from/to barycentric coordinates and bounding box and sphere generators.
The D3DX library contains pre-written routines for doing things common to most 2D/3D applications, such as games. Since the Direct3D API is relatively low-level, using the D3DX library is usually much simpler.
In 2012, Microsoft announced that D3DX 9, D3DX 10, and D3DX 11 would be deprecated in the Windows 8 SDK, along with other development frameworks such as XNA. Shader effects, texture management, geometry optimizations and mesh models are available as separate sources published through GitHub. The mathematical constructs of D3DX, like vectors and matrices, would be consolidated with XNAMath into a DirectXMath and spherical harmonics math is provided as separate source.
ID3DXFont
The interface can be used to draw 2D text. See also D3DXCreateText that creates 3D meshes of text.
ID3DXLine
The interface can be used for drawing anti-aliased screen-space lines with pattern.
ID3DXMesh
The interface is used for storage of meshes and mesh optimization for vertex cache friendliness and strip reordering. Some functions in D3DX operate on this interface. An example is D3DXComputeTangentFrame for creating a tangent-space frame for effects like normal and parallax mapping. A descendant of this class is ID3DXPMesh that can do geometry simplification.
ID3DXPRTEngine
It is used for Precomputed Radiance Transfer - a technique similar to spherical harmonics lighting that is used for precomputed global illumination and soft ambient lighting. Its methods were typically used offline to precompute per-vertex or per-texel transfer vectors, and Microsoft later noted that the PRT simulator remained available only in legacy D3DX9. DirectX Tool Kit, DirectXTex, DirectXMesh, and UVAtlas. There are also open source versions of DXUT and the Effects (FX11) runtime available.
Direct3D12
There is no DLL-based D3DX12 utility library. There is, however, a D3DX12 utility header (all inline C++ code) for some basic helpers for Direct3D 12 documented on Microsoft Docs and is published on GitHub. It does not include functionality such as math, sprites, font rendering, 3D shapes, meshes, or texture loading. There is a DirectX Tool Kit for Direct3D 12 which provides the missing functionality.
References
External links
- D3DX documentation on Microsoft Docs
- D3DX10 documentation on Microsoft Docs
- D3DX11 documentation on Microsoft Docs
- Living Without D3DX (formerly MSDN Blogs)
