World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000899491
Reproduction Date:

Title: D3dx  
Author: World Heritage Encyclopedia
Language: English
Subject: .NET Framework, DirectX, Half-precision floating-point format, CAPICOM, Composite UI Application Block
Collection: Directx, Microsoft Application Programming Interfaces
Publisher: World Heritage Encyclopedia


In computing, D3DX (Direct3D Extension) is a deprecated 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/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 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 CodePlex.[1] The mathematical constructs of D3DX, like vectors and matrices, would be consolidated with XNAMath into a DirectXMath[2] and spherical harmonics math is provided as separate source.[1]


  • Interfaces 1
    • ID3DXEffect 1.1
    • ID3DXFont 1.2
    • ID3DXLine 1.3
    • ID3DXMesh 1.4
    • ID3DXPRTEngine 1.5
    • ID3DXSprite 1.6
  • Functions 2
    • D3DXComputeTangentFrame 2.1
  • References 3
  • External links 4


The D3DX library follows the COM object oriented programming model. Functionality is accessed using C++-like interfaces.


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.


The ID3DXFont interface can be used to draw 2D text. See also D3DXCreateText that creates 3D meshes of text.


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


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.


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.


The ID3DXSprite interface is a C++ class used for drawing a 2D image to the screen known as a sprite in computer graphics. In 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 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.



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.


  1. ^ a b "Living without D3DX". MSDN. 
  2. ^ Microsoft. "Where is the DirectX SDK?". MSDN. Retrieved 18 October 2012. 

External links

  • D3DX documentation at MSDN
  • Living Without D3DX (MSDN Blogs)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.