Highly Optimized Graphics Math (glm) for C
📚 Documentation
Almost all functions (inline versions) and parameters are documented inside the corresponding headers.
Complete documentation: http://cglm.readthedocs.io
📌 Note for previous versions:
- _dup (duplicate) is changed to _copy. For instance
glm_vec_dup -> glm_vec3_copy
- OpenGL related functions are dropped to make this lib platform/third-party independent
- make sure you have latest version and feel free to report bugs, troubles
- [bugfix] euler angles was implemented in reverse order (extrinsic) it was fixed, now they are intrinsic. Make sure that
you have the latest version
- [major change] by starting v0.4.0, quaternions are stored as [x, y, z, w], it was [w, x, y, z] in v0.3.5 and earlier versions
- [api rename] by starting v0.4.5, glm_simd functions are renamed to glmm_
- [new option] by starting v0.4.5, you can disable alignment requirement, check options in docs.
- [major change] by starting v0.5.0, vec3 functions use glm_vec3_ namespace, it was glm_vec_ until v0.5.0
- [major change] by starting v0.5.1, built-in alignment is removed from vec3 and mat3 types
- [major change] by starting v0.7.3, inline print functions are disabled in release/production mode to eliminate print costs (see options in documentation). Print output also improved. You can disable colors if you need (see documentation)
- [major change] by starting v0.8.3, cglm supports alternative clipspace configuations e.g. Left Handed, Zero-to-One (_zo)...
CGLM_FORCE_DEPTH_ZERO_TO_ONE and CGLM_FORCE_LEFT_HANDED is provided to control clipspace. You should be able to use cglm with Vulkan, DirectX and Metal now... see https://cglm.readthedocs.io/en/latest/opt.html#clipspace-option-s
Reviews
Builds
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-static_O3 |
| timestamp |
2026-04-15 21:26:33 UTC (03 08:19:55 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew-O3 |
| timestamp |
2026-04-15 21:25:35 UTC (03 08:20:54 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-gcc_14_homebrew |
| timestamp |
2026-04-15 21:24:37 UTC (03 08:21:51 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-static_O3 |
| timestamp |
2026-04-15 19:49:17 UTC (03 09:57:12 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0-O3 |
| timestamp |
2026-04-15 19:48:07 UTC (03 09:58:22 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin23.5.0 |
| tgt config |
macos_14-clang_15.0 |
| timestamp |
2026-04-15 19:47:03 UTC (03 09:59:25 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_14.2_mingw_w64-static_O2 |
| timestamp |
2026-04-15 18:50:58 UTC (03 10:55:30 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18.3-static_O2 |
| timestamp |
2026-04-15 18:50:38 UTC (03 10:55:51 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18.3-static_O2 |
| timestamp |
2026-04-15 18:50:37 UTC (03 10:55:51 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_14.2_mingw_w64-O2 |
| timestamp |
2026-04-15 18:50:35 UTC (03 10:55:53 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-static_O3 |
| timestamp |
2026-04-15 18:50:33 UTC (03 10:55:55 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18.3-O2 |
| timestamp |
2026-04-15 18:50:32 UTC (03 10:55:56 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18.3-O2 |
| timestamp |
2026-04-15 18:50:23 UTC (03 10:56:05 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-ndebug_O3 |
| timestamp |
2026-04-15 18:50:10 UTC (03 10:56:19 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_42-gcc_15-bindist |
| timestamp |
2026-04-15 18:50:06 UTC (03 10:56:23 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-w64-mingw32 |
| tgt config |
windows_10-gcc_14.2_mingw_w64 |
| timestamp |
2026-04-15 18:49:59 UTC (03 10:56:29 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-msvc_18.3 |
| timestamp |
2026-04-15 18:49:56 UTC (03 10:56:32 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_ubuntu_24.04-gcc_13-bindist |
| timestamp |
2026-04-15 18:49:50 UTC (03 10:56:38 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16-O3 |
| timestamp |
2026-04-15 18:49:47 UTC (03 10:56:41 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.5 |
| tgt config |
windows_10-clang_21_msvc_18.3 |
| timestamp |
2026-04-15 18:49:44 UTC (03 10:56:44 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-static_O3 |
| timestamp |
2026-04-15 18:49:41 UTC (03 10:56:47 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15-static_O3 |
| timestamp |
2026-04-15 18:49:37 UTC (03 10:56:51 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-microsoft-win32-msvc14.3 |
| tgt config |
windows_10-msvc_17.14 |
| timestamp |
2026-04-15 18:49:32 UTC (03 10:56:57 days ago) |
| result |
warning (update) | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_14-bindist |
| timestamp |
2026-04-15 18:49:31 UTC (03 10:56:58 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15-ndebug_O3 |
| timestamp |
2026-04-15 18:49:29 UTC (03 10:56:59 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_16 |
| timestamp |
2026-04-15 18:49:22 UTC (03 10:57:06 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++-O3 |
| timestamp |
2026-04-15 18:49:19 UTC (03 10:57:09 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22_libc++ |
| timestamp |
2026-04-15 18:49:18 UTC (03 10:57:10 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-apple-darwin22.5.0 |
| tgt config |
macos_13-clang_15.0 |
| timestamp |
2026-04-15 18:49:07 UTC (03 10:57:22 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-static_O3 |
| timestamp |
2026-04-15 18:48:57 UTC (03 10:57:32 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15-O3 |
| timestamp |
2026-04-15 18:48:55 UTC (03 10:57:33 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21_libc++-O3 |
| timestamp |
2026-04-15 18:48:44 UTC (03 10:57:44 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21_libc++-static_O3 |
| timestamp |
2026-04-15 18:48:42 UTC (03 10:57:46 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21_libc++ |
| timestamp |
2026-04-15 18:48:38 UTC (03 10:57:50 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_fedora_43-gcc_15-bindist |
| timestamp |
2026-04-15 18:48:33 UTC (03 10:57:55 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22-O3 |
| timestamp |
2026-04-15 18:48:31 UTC (03 10:57:57 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-gcc_15 |
| timestamp |
2026-04-15 18:48:10 UTC (03 10:58:18 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_22 |
| timestamp |
2026-04-15 18:48:07 UTC (03 10:58:21 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21-O3 |
| timestamp |
2026-04-15 18:47:56 UTC (03 10:58:32 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21 |
| timestamp |
2026-04-15 18:47:54 UTC (03 10:58:34 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_21-static_O3 |
| timestamp |
2026-04-15 18:47:53 UTC (03 10:58:35 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_13-clang_20 |
| timestamp |
2026-04-15 18:47:48 UTC (03 10:58:40 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-O3 |
| timestamp |
2026-04-15 18:47:41 UTC (03 10:58:48 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14 |
| timestamp |
2026-04-15 18:47:19 UTC (03 10:59:10 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-static_O3 |
| timestamp |
2026-04-15 18:47:07 UTC (03 10:59:21 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19-O3 |
| timestamp |
2026-04-15 18:47:05 UTC (03 10:59:23 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd15.0 |
| tgt config |
freebsd_15-clang_19 |
| timestamp |
2026-04-15 18:46:58 UTC (03 10:59:30 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
x86_64-freebsd14.1 |
| tgt config |
freebsd_14-clang_18 |
| timestamp |
2026-04-15 18:46:38 UTC (03 10:59:51 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-static_O3 |
| timestamp |
2026-04-15 18:44:43 UTC (03 11:01:45 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-ndebug_O3 |
| timestamp |
2026-04-15 18:43:55 UTC (03 11:02:33 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14-O3 |
| timestamp |
2026-04-15 18:43:09 UTC (03 11:03:20 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_14 |
| timestamp |
2026-04-15 18:42:16 UTC (03 11:04:13 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-static_O3 |
| timestamp |
2026-04-15 17:55:46 UTC (03 11:50:42 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++ |
| timestamp |
2026-04-15 17:54:59 UTC (03 11:51:29 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18_libc++-O3 |
| timestamp |
2026-04-15 17:54:57 UTC (03 11:51:31 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-O3 |
| timestamp |
2026-04-15 17:54:07 UTC (03 11:52:21 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18-static_O3 |
| timestamp |
2026-04-15 17:54:06 UTC (03 11:52:23 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-clang_18 |
| timestamp |
2026-04-15 17:53:15 UTC (03 11:53:14 days ago) |
| result |
success | log | rebuild |
| toolchain |
public-0.18.1 |
| target |
aarch64-linux-gnu |
| tgt config |
linux_debian_12-gcc_13 |
| timestamp |
2026-04-15 14:58:31 UTC (03 14:47:58 days ago) |
| result |
success | log | rebuild |