GLM
DirectXMath
Our great sponsors
GLM | DirectXMath | |
---|---|---|
36 | 13 | |
8,671 | 1,481 | |
2.2% | 1.5% | |
9.0 | 6.8 | |
5 days ago | 22 days ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | MIT License |
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.
GLM
- Release of GLM 1.0.0
- C++23: The Next C++ Standard
-
What files from glm's github do I need to add to my emscripten project?
I am a greenhorn at graphics programming. I just made an app in OpenGL with C++ that I now need to change over to a browser app with WebGL. WebGL looks pretty cool but since my app does a lot of calculations I assumed I should keep the heavier calculating parts in C++ with emscripten ( which I am also just learning ). So looking at it, it just looks like glm is the only library I seriously need for my c++ code and that seems pretty cool because it is a header only app it says. But in the github there are a lot of folders and files so I am not sure which are indispensable or not. Any advice?
-
What is a file with the .i.hh extension such as myfile.i.hh used for in a C++ project?
GLM does it quite well, it has core includes then a detail folder with all the inl files that get added. https://github.com/g-truc/glm
- [Opengl] Aide: compilation et installation de GLFW
-
Porting to metal?
I once ported an OpenGL code base over to Metal. For me, it was essential to do as much code sharing as possible. Because I was using the GLM library in that code base and generally found that library very useful I wanted to know whether I can use GLM with Metal. I had to do some research but it turned out it works really well, see here
- Which is the best way to work with matrices and linear algebra using c++?
-
Best C++ Game Framework
I would also recommend GLM
- PocketPy: A Lightweight(~5000 LOC) Python Implementation in C++17
-
Learning DirectX 12 in 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).
DirectXMath
-
Vector math library benchmarks (C++)
For those unfamiliar, like I was, DXM is DirectXMath.
-
Learning DirectX 12 in 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
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
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
-
Eigen: A C++ template library for linear algebra
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 ?
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
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?
For graphics DX math is a very good library.
-
Speeding Up `Atan2f` by 50x
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?
Eigen
highway - Performance-portable, length-agnostic SIMD with runtime dispatch
linmath.h - a lean linear math library, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions
libjxl - JPEG XL image format reference implementation
cglm - 📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
Fastor - A lightweight high performance tensor algebra framework for modern C++
OpenBLAS - OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
glibc - GNU Libc
blaze
Vc - SIMD Vector Classes for C++
CGal - The public CGAL repository, see the README below
highway - Highway - A Modern Javascript Transitions Manager