HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, D3DX (Direct3D Extension) is a high level
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
library which is written to supplement
Microsoft Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
's
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
graphics API. The D3DX library was introduced in Direct3D 7, and subsequently was improved in
Direct3D 9 Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
. 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 A particle system is a technique in game physics, motion graphics, and computer graphics that uses many minute sprites, 3D models, or other graphic objects to simulate certain kinds of "fuzzy" phenomena, which are otherwise very hard to rep ...
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 Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
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 several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing ...
in the
Windows 8 Windows 8 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on August 1, 2012; it was subsequently made available for download via MSDN and TechNet on August 15, 2012, and later to ...
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 GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
. The mathematical constructs of D3DX, like vectors and
matrices Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
, would be consolidated with XNAMath into a DirectXMath and spherical harmonics math is provided as separate source.


Interfaces

The D3DX library follows the
COM Com or COM may refer to: Computing * COM (hardware interface), a serial port interface on IBM PC-compatible computers * COM file, or .com file, short for "command", a file extension for an executable file in MS-DOS * .com, an Internet top-level d ...
object oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
model. Functionality is accessed using C++-like interfaces.


ID3DXEffect

The ID3DXEffect interface is used for compiling and binding FX shaders (.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 ID3DXFont interface can be used to draw 2D text. See also D3DXCreateText that creates 3D meshes of text.


ID3DXLine

The ID3DXLine interface can be used for drawing anti-aliased screen-space lines with pattern.


ID3DXMesh

The 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 Precomputed Radiance Transfer (PRT) is a computer graphics technique used to render a scene in real time with complex light interactions being precomputed to save time. Radiosity methods can be used to determine the diffuse lighting of the scene, ...
- a technique similar to spherical harmonics lighting that is used for precomputed global illumination and soft ambient lighting.


ID3DXSprite

The ID3DXSprite interface is a
C++ class C class may refer to: Ships * C-class destroyer (disambiguation), multiple destroyers * C-class submarine (disambiguation), multiple submarines * C-class corvette (disambiguation), ships of the Victorian Royal Navy * C-class cruiser, Royal Navy l ...
used for drawing a 2D image to the screen known as a sprite in
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great deal ...
. In
DirectX 7 Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct ...
this was typically done using the
DirectDraw DirectDraw (ddraw.dll) is an API that used to be a part of Microsoft's DirectX API. DirectDraw is used to accelerate rendering of 2D graphics in applications. DirectDraw also allows applications to run fullscreen or embedded in a window such as m ...
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 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 9 Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
.


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 The hairy ball theorem of algebraic topology (sometimes called the hedgehog theorem in Europe) states that there is no nonvanishing continuous tangent vector field on even-dimensional ''n''-spheres. For the ordinary sphere, or 2‑sphere, if ...
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 Windows Imaging Component (WIC) is a COM-based imaging codec framework introduced in Windows Vista (and later available in Windows XP Service Pack 3) for working with and processing digital images and image metadata. WIC enables application ...
. As a consequence of the shift to using WIC, D3DX10 did not support
Truevision TGA Truevision TGA, often referred to as TARGA, is a raster graphics file format created by Truevision Inc. (now part of Avid Technology). It was the native format of TARGA and VISTA boards, which were the first graphic cards for IBM-compatible ...
,
RGBE image format RGBE or Radiance HDR is an image format invented by Gregory Ward Larson for the Radiance rendering system. It stores pixels as one byte each for RGB (red, green, and blue) values with a one byte shared exponent. Thus it stores four bytes per pixe ...
, or
Portable PixMap Netpbm (formerly Pbmplus) is an open-source package of graphics programs and a programming library. It is used mainly in the Unix world, where one can find it included in all major open-source operating system distributions, but also works on Mi ...
file formats which were supported by D3DX. D3DX10 also did not include the UVAtlas isochart texture atlasing or
Precomputed Radiance Transfer Precomputed Radiance Transfer (PRT) is a computer graphics technique used to render a scene in real time with complex light interactions being precomputed to save time. Radiosity methods can be used to determine the diffuse lighting of the scene, ...
APIs. All versions of D3DX10 are deprecated per Microsoft Docs.


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. Most functionality from D3DX9, D3DX10, and D3DX11 has been moved to open source projects for Direct3D 11 or later: DirectXMath, 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)
{{DEFAULTSORT:D3dx Microsoft application programming interfaces 3dx D3DX