Description
cglm is a highly optimised 2D and 3D graphics maths library for C, known as OpenGL Mathematics for C. It provides fast and ergonomic functions to simplify graphics programming. The README says it is allocation-free, header-only and SIMD-optimised, and that it is API-agnostic, so it works with OpenGL and other graphics APIs. You can use the whole library by including cglm/cglm.h, or link against a build if you prefer. Build instructions for individual platforms and build systems are in BUILDING.md. Every function and its parameters are documented above its declaration in the header, and the project's complete documentation is linked from the README. The README also explains alignment requirements, which matter when you store the library's types in your own structures. If you are working in C++, the README points to GLM, the C++ maths library. The project is on GitHub, and bugs and issues can be reported there.…
Highlights
- Header-only 2D and 3D maths for C
- Allocation-free and SIMD-optimised
- API-agnostic for graphics work
- Functions documented in the headers
- Build with supported build systems
Ratings & Reviews
No ratings yet
Be the first to rate Cglm.
People also visit
Glumpy
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization
Cglm FAQ
What is cglm?
A highly optimised 2D and 3D graphics maths library for C, sometimes called OpenGL Mathematics for C.
Do I need to build it?
No. The README says it can be used as a header-only library by including cglm/cglm.h. You can also link against it after building.
Where are the build instructions?
In BUILDING.md in the repository, which covers individual platforms and build systems.
Is there a C++ option?
The README points C++ users to GLM, the C++ maths library.
Where is the documentation?
Each function is documented above its declaration in the headers, and the README links the complete documentation.
What are the best Cglm alternatives?
Popular alternatives to Cglm include RTM, Kotlin Math and Tinyexpr. See all Cglm alternatives



