Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. cglm provides lot of utils to help math operations to be fast and quick to write. It is community-friendly, feel free to bring any issues, bugs you faced. Almost all functions (inline versions) and parameters are documented inside the corresponding headers. OpenGL-related functions are dropped to make this lib platform/third-party independent. Make sure you have the latest version and feel free to report bugs, troubles. Euler angles was implemented in reverse order (extrinsic) it was fixed, now they are intrinsic. Make sure that you have the latest version. vec4 and mat4 variables must be aligned. (There will be unaligned versions later). cglm doesn't alloc any memory on heap. So it doesn't provide any allocator. You should alloc memory for out parameters too if you pass pointer of memory location.

Features

  • cglm supports both ARRAY API and STRUCT API
  • Like some other graphics libraries (especially OpenGL) this library use Column-Major layout to keep matrices in the memory
  • Scalar and simd (sse, avx, neon...) optimizations
  • Option to use different clipspaces e.g. Left Handed, Zero-to-One... (currrently right handed negative-one is default)
  • Array api and struct api, you can use arrays or structs
  • General purpose vector operations (cross, dot, rotate, proj, angle...)
  • Matrix decomposition (extract rotation, scaling factor)

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow OpenGL Mathematics

OpenGL Mathematics Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of OpenGL Mathematics!

Additional Project Details

Programming Language

C

Related Categories

C 3D Modeling Software, C Mathematics Software

Registered

2022-02-22