The DirectXMath library is based on the XNA Math C++ SIMD library version 2.04. Here we describe how DirectXMath differs from XNA Math and how DirectXMath versions differ.
Here is how the DirectXMath library primarily differs from the XNA Math library:
- DirectXMath is C++ only (namespaces, overloads, new templates, and so on).
- Requires C++11 standard library support (that is, stdint.h, and so on).
- ARM-NEON intrinsics support for the Windows RT platform.
- New color functionality (color space conversions, .NET color constants).
- Bounding volume types (a version of which was previously in the XNACollision header in the DirectX SDK Collision sample).
- No Xbox 360 version is available. The Xbox 360 XDK continues to ship XNAMath v2.x; removal of Xbox 360 specific data types and function variants.
- Reworked XMVectorPermute for improved optimization for SSE and ARM-NEON intrinsics.
- The XMMATRIX type is fully opaque. To access individual elements of XMMATRIX, use other types such as XMFLOAT4X4.
The Windows SDK for Windows 8 shipped with DirectXMath version 3.03.
The Windows SDK for Windows 8.1 ships with DirectXMath version 3.06.
Here is how DirectXMath version 3.06 differs from DirectXMath version 3.03:
- 3.06 fixes load/store of XMFLOAT3SE to properly match the DXGI_FORMAT_R9G9B9E5_SHAREDEXP definition.
- 3.06 adds XMLoadUDecN4_XR and XMStoreUDecN4_XR to match the DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM definition.
- 3.06 adds XMColorRGBToSRGB and XMColorSRGBToRGB to convert between linear RGB and sRGB.
- 3.06 adds XMVectorExp2, XMVectorLog2, XMVectorExpE, and XMVectorLogE functions to provide base-e support in addition to the existing base-2 support.
- 3.06 uses the x86/x64 __vectorcall calling-convention when available. 3.05 introduces XM_CALLCONV, HXMVECTOR, and FXMMATRIX.
- 3.06 updates the matrix version of the Transform method for BoundingOrientedBox and BoundingFrustum to handle scaling.
- 3.06 provides additional optimizations for Stream functions.
- 3.06 improves the XMVectorRound algorithm.
- The 3.06 implementations of the XMConvertHalfToFloat and XMConvertFloatToHalf functions now use IEEE 754 standard float16 behavior for INF/QNAN.
- 3.06 fixes an issue with the XMVectorFloor and XMVectorCeiling functions when they are given whole odd numbers (for example, 105.0).
- 3.06 fixes potential warning C4723 when using operator/ or operator/=.
- The 3.06 implementation of the XMVector3Cross function now ensures that the w component is zero on the Windows RT platform.
- With 3.06, ARM-NEON code paths use multiply-by-scalar intrinsics when ARM-NEON intrinsics are supported.