Skip to content

Commit aae82c1

Browse files
committed
README: Add chapter about alignment
1 parent 7e51ed8 commit aae82c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<br>
4040

4141
<p align="center">
42-
Also known as <b>OpenGL Mathematics (glm) for C</b>, <b>cglm</b> provides fast and ergonomic math functions to ease graphics programming. It is community friendly – feel free to report any bugs and issues you face. <br>
42+
A highly optimized 2D|3D math library. Also known as OpenGL Mathematics (glm) for C. <b>cglm</b> provides fast and ergonomic math functions to ease graphics programming. It is community friendly – feel free to report any bugs and issues you face. <br>
4343
<i>If you're using C++, you might want to check out <a href="https://github.com/g-truc/glm">GLM</a></i>
4444
</p>
4545

@@ -96,6 +96,10 @@ vec2 vector;
9696
glmc_vec2_zero(vector);
9797
```
9898
99+
### ❗ Alignment
100+
101+
While cglm by default aligns what's necessary, it is possible to disable this by defining `CGLM_ALL_UNALIGNED`. If you're targeting machines with any kind of SIMD support, make sure that all `vec4`, `mat4` and `mat2` arguments you pass to cglm functions are aligned to prevent unexpected crashes, alternatively use the unaligned versions if present.
102+
99103
### Struct API
100104
101105
The struct API works as follows (note the `s` suffix on types, `glms_` prefix on functions and `GLMS_` on constants):

0 commit comments

Comments
 (0)