Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
D3DX
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|High level API library}} {{refimprove|date=June 2020}} In [[computing]], '''D3DX''' (Direct3D Extension) is a high level [[application programming interface|API]] library which is written to supplement [[Microsoft]]'s [[Direct3D]] graphics API. The D3DX library was introduced in [[Direct3D#History|Direct3D 7]], and subsequently was improved in [[Direct3D#History|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 system]]s. 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 [[Deprecation|deprecated]] in the [[Windows 8]] SDK,<ref name=D3DXInWindows8>{{cite web |url=https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d11-graphics-reference-d3dx11-functions |title=D3DX Functions (Direct3D 11 Graphics) |date=18 August 2023 |publisher=Microsoft}}</ref> along with other development frameworks such as [[Microsoft XNA|XNA]]. Shader effects, texture management, geometry optimizations and mesh models are available as separate sources published through [[GitHub]].<ref name=LivingWithoutD3DX>{{cite web |url=https://walbourn.github.io/living-without-d3dx/ |title=Living without D3DX|date=20 August 2013| publisher=MSDN}}</ref> The mathematical constructs of D3DX, like [[Euclidean vector|vectors]] and [[Matrix (mathematics)|matrices]], would be consolidated with XNAMath into a DirectXMath<ref name=WhereIsDXSDK>{{cite web|title=Where is the DirectX SDK?|url=https://docs.microsoft.com/en-us/windows/win32/directx-sdk--august-2009- |publisher=Microsoft|access-date=28 June 2020|author=Microsoft}}</ref> and spherical harmonics math is provided as separate source.<ref name="LivingWithoutD3DX"/> ==Interfaces== The D3DX library follows the [[Component object model|COM]] [[object-oriented programming]] model. Functionality is accessed using [[C++]]-like interfaces. ===ID3DXEffect=== The {{Mono|ID3DXEffect}} interface is used for compiling and binding FX shaders ({{Mono|.fx}}). It supports automatic mapping of named shader parameters to hardware constant registers, parameter pools, mapping textures to available samplers, specifying 'techniques' and modifying render states. ===ID3DXFont=== The {{Mono|ID3DXFont}} interface can be used to draw 2D text. See also D3DXCreateText that creates 3D meshes of text. ===ID3DXLine=== The {{Mono|ID3DXLine}} interface can be used for drawing anti-aliased screen-space lines with pattern. ===ID3DXMesh=== The {{Mono|ID3DXMesh}} 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. ===ID3DXSprite=== The {{Mono|ID3DXSprite}} interface is a [[C++ class]] used for drawing a 2D image to the screen known as a [[sprite (computer graphics)|sprite]] in [[computer graphics]]. In [[DirectX|DirectX 7]] this was typically done using the [[DirectDraw]] API, which is deprecated. The programmer typically needs only to call the ID3DXSprite object's Begin() method to set up the render state and world transform for 2D drawing, call the Draw() method to add [[Texture (computer graphics)|textures]] to the list to be drawn and finally call the End() method to draw the images to the screen and restore the original graphics state. A common criticism of the D3DXSprite was that it was slow but this issue has been addressed as of [[Direct3D#Version history|Direct3D 9]]. ==Functions== ===D3DXComputeTangentFrame=== It computes the tangent-space frame of a mesh that is used for effects like normal/bump mapping, parallax mapping and anisotropic lighting models. It handles vertices at tangent-space discontinuities by making duplicates, thus solving the [[hairy ball]] problem. It doesn't handle reversed UV winding of faces so models with mirrored texture mapping may run into lighting troubles because of this. ==Direct3D10== The D3DX10 utility library for Direct3D 10 was similar to the D3DX for Direct3D 9 in functionality, and included the same D3DXMath library and Block Compression (BC1-BC5) software codecs. The key differences were that Effects for Direct3D 10 was made an OS component, the HLSL compiler was moved to a distinct D3DCompile DLL, and the texture image load & save code utilized the [[Windows Imaging Component]]. As a consequence of the shift to using WIC, D3DX10 did not support [[Truevision TGA]], [[RGBE image format]], or [[Portable PixMap]] file formats which were supported by D3DX. D3DX10 also did not include the UVAtlas isochart texture atlasing or [[Precomputed Radiance Transfer]] APIs. All versions of D3DX10 are deprecated per Microsoft Docs.<ref name=WhereIsDXSDK /> ==Direct3D11== The D3DX11 utility library for Direct3D 11 was a trimmed down version of D3DX10. It included texture image load & save code using WIC, and the Block Compression (BC1-BC7) software codecs, but little else. All versions of D3DX11 are deprecated per Microsoft Docs.<ref name=WhereIsDXSDK /> Most functionality from D3DX9, D3DX10, and D3DX11 has been moved to open source projects for Direct3D 11 or later: DirectXMath,<ref name=DirectXMath>{{cite web |url=https://github.com/microsoft/DirectXMath/ |title=DirectXMath|date=17 February 2022| publisher=GitHub}}</ref> DirectX Tool Kit,<ref name=DirectXTK>{{cite web |url=https://github.com/microsoft/DirectXTK/ |title=DirectX Tool Kit for DX11|date=18 February 2022| publisher=GitHub}}</ref> DirectXTex,<ref name=DirectXTex>{{cite web |url=https://github.com/microsoft/DirectXTex/ |title=DirectXTex texture processing library|date=16 February 2022| publisher=GitHub}}</ref> DirectXMesh,<ref name=DirectXMesh>{{cite web |url=https://github.com/microsoft/DirectXMesh/ |title=DirectXMesh geometry processing library|date=18 February 2022| publisher=GitHub}}</ref> and UVAtlas.<ref name=UVAtlas>{{cite web |url=https://github.com/microsoft/UVAtlas/ |title=UVAtlas isochart texture atlasing library|date=15 February 2022| publisher=GitHub}}</ref> There are also open source versions of DXUT<ref name=DXUT>{{cite web |url=https://github.com/microsoft/DXUT/ |title=DXUT for Direct3D 11|date=12 February 2022| publisher=GitHub}}</ref> and the Effects (FX11)<ref name=FX11>{{cite web |url=https://github.com/microsoft/FX11/ |title=Effects for Direct3D 11|date=12 February 2022| publisher=GitHub}}</ref> 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<ref>{{cite web|title=Helper Structures and Functions for D3D12|url=https://docs.microsoft.com/en-us/windows/win32/direct3d12/helper-structures-and-functions-for-d3d12|publisher=Microsoft|access-date=28 June 2020|author=Microsoft}}</ref> and is published on GitHub.<ref name=DirectXGraphicsSamples>{{cite web |url=https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Libraries/D3DX12/ |title=D3DX12| publisher=GitHub}}</ref> 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<ref name=DirectXTK12>{{cite web |url=https://github.com/microsoft/DirectXTK12/ |title=DirectX Tool Kit for DX12|date=18 February 2022| publisher=GitHub}}</ref> which provides the missing functionality. ==References== {{Reflist}} ==External links== * [https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dx D3DX documentation on Microsoft Docs] * [https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-reference-d3dx10 D3DX10 documentation on Microsoft Docs] * [https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d11-graphics-reference-d3dx11-functions D3DX11 documentation on Microsoft Docs] * [https://walbourn.github.io/living-without-d3dx/ Living Without D3DX (formerly MSDN Blogs)] {{Microsoft APIs}} {{DEFAULTSORT:D3dx}} [[Category:Microsoft application programming interfaces]] [[Category:DirectX|3dx D3DX]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Microsoft APIs
(
edit
)
Template:Mono
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)