DirectXTK VS DirectXMath

Compare DirectXTK vs DirectXMath and see what are their differences.

DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++ (by microsoft)

DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps (by microsoft)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
DirectXTK DirectXMath
12 13
2,485 1,481
1.2% 1.5%
7.6 6.8
21 days ago 22 days ago
C++ C++
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

DirectXTK

Posts with mentions or reviews of DirectXTK. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-12.
  • I need help to make SSE Display Tweaks work.
    1 project | /r/skyrimmods | 9 Oct 2023
    LoadScreenAllow= LoadScreenBlock=All Note: In cases where only loadscreens with conditions are allowed, it is possible that none will show even if no others are available. LoadScreenFilter=false LoadScreenAllow= LoadScreenBlock=All Remove all lens flare from weather records. This is done in-memory and is not persistent. DisableWeatherLensFlare=false Disable actor fade when camera intersects the body. DisableActorFade=false Disable player fade when camera intersects the body. DisablePlayerFade=false [OSD] Enable the on-screen display. Enable=false InitiallyOn=true Comma separated list of displayed stats. fps - Framerate bare_fps - Just the framerate, no formatting frametime - Frametime bare_frametime - Just the frametime, no formatting counter - Frame counter vram - Video ram usage (used / budget) * all - Everything * Note that this line does not show total amount of memory available but rather the OS allocated budget which can vary based on how much is consumed by other applications. If usage exceeds the budget, you'll likely experience stuttering. Requires DXGI 1.4. Stats related to specific drivers are configured in their respective sections. Show=fps,vram How often the OSD updates (in seconds). UpdateInterval=0.3 Keys used used to toggle the OSD. ComboKey uses built-in constants, ToggleKey is a DX scan code (https://www.creationkit.com/index.php?title=Input\_Script) ComboKey: 1 - Left Shift 2 - Right Shift 3 - Left Control 4 - Right Control 5 - Left Alt 6 - Right Alt 7 - Left Win 8 - Right Win ComboKey=1 and ToggleKey=0xD2 is Left Shift + Insert ComboKey=1 ToggleKey=0xD2 Align the OSD. 1 - Top Left 2 - Top Right 3 - Bottom Left 4 - Bottom Right Align=1 OSD position offset (X Y). Offset=4 4 Font scale (X Y) Omit Y for uniform scaling Scale=1.0 0.9 Adjust font scale based on amount of lines drawn. AutoScale=true Scale font size based on window size. Size remains constant when resolution to window size ratio != 1, for example when playing at non-native resolutions. ScaleToWindow=true Set a custom font. You can generate bitmaps from fonts installed on your system with MakeSpriteFont. https://github.com/microsoft/DirectXTK/wiki/MakeSpriteFont Run the tool with /NoPremultiply and place files in Data\SKSE\Plugins\SDTFonts FontFile= Font and outline color (RGBA). Color=255 255 255 255 OutlineColor=0 0 0 255 Outline offset. OutlineOffset=1 "
  • Xenia: Xbox 360 Emulator
    4 projects | news.ycombinator.com | 12 Jul 2023
    XNA died when the people behind it left, thus the C++ side won once again, and DirectXTK was born as replacement.

    https://walbourn.github.io/directxtk/

    Years later they kind of sponsored Monogame, when they were recovering from XBox One mess,

    https://news.xbox.com/en-us/2016/03/14/letter-chris-charla-i...

    By the way, I think one of these episodes talks about the emulation, but I am not certain if it was on this podcast I heard about it.

    https://theretrohour.com/?s=xbox

  • Need help converting wav files to XWB without the wav file names being changed
    1 project | /r/Modding | 2 Jul 2023
    So for the past 8 hours, I've been trying to mod the music files for Bloons Monkey City. I converted some songs I wanted to use in BMC using audacity to wav and made sure to rename the files to the songs I wanted to replace. I used XWBtool to repackage the wav files into an XWB file, the file format BMC uses to store its music in. I used Foobar2000 to view the XMB file, and for whatever reason all the song names get changed to whatever the XWB file name is after repackaging them using XWBtool (I.e. The XWB's file name is whatever the first wav file XWBtool repackages. In my case, "WaveBank#1 (MCity_MvM)" is the first wav file that gets repackaged, so for whatever reason every other file also gets its names changed to "WaveBank#1 (MCity_MvM)," which is causing me a problem as BMC won't be able to read the other music files.).
  • Flight Mechanics
    1 project | /r/Starfield | 20 Jun 2023
  • Learning DirectX 12 in 2023
    13 projects | dev.to | 30 Jan 2023
    DirectXTK 12 (includes SimpleMath and other goodies)
  • Where can I learn directX
    1 project | /r/cpp_questions | 21 Dec 2022
    DirectXtutorial doesn't seem to have the greatest C++ code either. I would definitely use ComPtr.
  • Where to start learning OpenGL or DirectX11 Graphics Programming with C++?
    4 projects | /r/GraphicsProgramming | 9 Jun 2022
    DirectXTK (basically XNA ported to C++, after it was dropped)
  • Chrono Cross: The Radical Dreamers Edition - How to play with the new graphics BUT with the old fonts
    1 project | /r/JRPG | 10 Apr 2022
    Thank you for your reply, I make spritefont from this link https://github.com/microsoft/DirectXTK/wiki/SpriteFont but still cannot show the right font Maybe have to check parameter of old font
  • I'm having a hard time staying committed to learning C++ and OpenGL for game development.
    6 projects | /r/cpp | 31 Mar 2022
    Because you get stuff like DirectXTK and PIX from the company that does the API, while on Khronos stuff you need to go hunting for comunity or GPU vendor specific tooling.
  • How to handle multithreading in concept.
    2 projects | /r/gamedev | 27 Dec 2021
    then check up this https://github.com/microsoft/DirectXTK/wiki/Getting-Started

DirectXMath

Posts with mentions or reviews of DirectXMath. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-15.
  • Vector math library benchmarks (C++)
    3 projects | /r/GraphicsProgramming | 15 Apr 2023
    For those unfamiliar, like I was, DXM is DirectXMath.
  • Learning DirectX 12 in 2023
    13 projects | dev.to | 30 Jan 2023
    Alongside MiniEngine, you’ll want to look into the DirectX Toolkit. This is a set of utilities by Microsoft that simplify graphics and game development. It contains libraries like DirectXMesh for parsing and optimizing meshes for DX12, or DirectXMath which handles 3D math operations like the OpenGL library glm. It also has utilities for gamepad input or sprite fonts. You can see a list of the headers here to get an idea of the features. You’ll definitely want to include this in your project if you don’t want to think about a lot of these solved problems (and don’t have to worry about cross-platform support).
  • Optimizing compilers reload vector constants needlessly
    7 projects | news.ycombinator.com | 6 Dec 2022
    Bad news. For SIMD there are not cross-platform intrinsics. Intel intrinsics map directly to SSE/AVX instructions and ARM intrinsics map directly to NEON instructions.

    For cross-platform, your best bet is probably https://github.com/VcDevel/std-simd

    There's https://eigen.tuxfamily.org/index.php?title=Main_Page But, it's tremendously complicated for anything other than large-scale linear algebra.

    And, there's https://github.com/microsoft/DirectXMath But, it has obvious biases :P

  • MATHRIL - Custom math library for game programming
    3 projects | /r/cpp | 6 Jul 2022
    I am not in gamedev, but work with 3D graphics, we use DirectX 11, so DirectXMath was a natural choice, it is header only, it supports SIMD instructions (SSE, AVX, NEON etc.), it can even be used on Linux (has no dependence on Windows). It of course just one choice: https://github.com/Microsoft/DirectXMath.
  • When i had to look up what a Quaternion is
    2 projects | /r/ProgrammerHumor | 5 Jul 2022
  • Eigen: A C++ template library for linear algebra
    6 projects | news.ycombinator.com | 4 Apr 2022
    I never really used GLM, but Eigen was substantially slower than DirectXMath https://github.com/microsoft/DirectXMath for these things. Despite the name, 99% of that library is OS agnostic, only a few small pieces (like projection matrix formula) are specific to Direct3D. When enabled with corresponding macros, inline functions from that library normally compile into pretty efficient manually vectorized SSE, AVX or NEON code.

    The only major issue, DirectXMath doesn’t support FP64 precision.

  • maths - templated c++ linear algebra library with vector swizzling, intersection tests and useful functions for games and graphics dev... includes live webgl/wasm demo ?
    3 projects | /r/cpp | 12 Jan 2022
    If you’re the author, consider comparisons with the industry standards, glm and DirectXMath, which both ensure easy interoperability with the two graphics APIs.
  • Algorithms for division: Using Newton's method
    1 project | news.ycombinator.com | 8 Dec 2021
    Good article, but note that if the hardware supports the division instruction, will be much faster than the described workarounds.

    Personally, I recently did what’s written in 2 cases: FP32 division on ARMv7, and FP64 division on GPUs who don’t support that instruction.

    For ARM CPUs, not only they have FRECPE, they also have FRECPS for the iteration step. An example there: https://github.com/microsoft/DirectXMath/blob/jan2021/Inc/Di...

    For GPUs, Microsoft classified FP64 division as “extended double shader instruction” and the support is optional. However, GPUs are guaranteed to support FP32 division. The result of FP32 division provides an awesome starting point for Newton-Raphson refinement in FP64 precision.

  • Use of BLAS vs direct SIMD for linear algebra library operations?
    3 projects | /r/cpp | 28 Aug 2021
    For graphics DX math is a very good library.
  • Speeding Up `Atan2f` by 50x
    7 projects | news.ycombinator.com | 17 Aug 2021
    I wonder how does it compare with Microsoft’s implementation, there: https://github.com/microsoft/DirectXMath/blob/jan2021/Inc/Di...

    Based on the code your version is probably much faster. It would be interesting to compare precision still, MS uses 17-degree polynomial there.

What are some alternatives?

When comparing DirectXTK and DirectXMath you can also consider the following projects:

GLFW - A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input

GLM - OpenGL Mathematics (GLM)

Skia - Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

highway - Performance-portable, length-agnostic SIMD with runtime dispatch

Open-Source Vulkan C++ API - Open-Source Vulkan C++ API

libjxl - JPEG XL image format reference implementation

Irrlicht - An automatically updated mirror of the Irrlicht SVN repository on sourceforge

Fastor - A lightweight high performance tensor algebra framework for modern C++

magnum - Lightweight and modular C++11 graphics middleware for games and data visualization

glibc - GNU Libc

bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Vc - SIMD Vector Classes for C++