A pure Go 3D math library specialized for OpenGL graphics, with 32-bit and 64-bit float support.
MathGL is a pure Go 3D mathematics library specialized for OpenGL graphics programming. It provides vector, matrix, and quaternion operations essential for 3D transformations, rendering, and simulations, with support for both 32-bit and 64-bit floating-point precision.
Go developers working on 3D graphics, game engines, simulations, or any project requiring OpenGL integration and linear algebra computations.
Developers choose MathGL for its native Go implementation, OpenGL-specific optimizations like Column Major Order, and dual precision support, offering a reliable and performant alternative to C++ math libraries in the Go ecosystem.
A pure Go 3D math library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Column Major Order for matrices and vectors to match OpenGL's memory layout, reducing integration overhead and avoiding transposition errors in graphics code.
Provides separate mgl32 and mgl64 subpackages for 32-bit and 64-bit floats, allowing developers to choose based on performance or accuracy needs for OpenGL or general math.
Core vector and matrix operations are generated from templates, ensuring uniformity across types and minimizing manual errors, as noted in the contribution guidelines.
Includes essential operations for graphics programming, such as transformations, projections, and quaternion handling, covering key needs for 3D rendering and simulations.
The README admits to API-breaking changes between Go version releases and deprecated function removals, which can disrupt long-term project maintenance and updates.
Contributors must edit template files and run go generate instead of modifying core files directly, adding a layer of complexity for those extending the library.
Examples are housed in a separate repository, and the README includes troubleshooting for version mismatches, indicating a lack of integrated documentation for beginners.
While excellent for OpenGL, the library's design choices (like Column Major Order) make it less suitable for other graphics APIs or general-purpose linear algebra without adaptation.