Commit Graph

757 Commits

Author SHA1 Message Date
Carsten Hartenfels
d89c01b39f Intuit if we should use anonymous structs
Rather than making the user #define something explicitly, we can guess
based on the compiler type and C standard.
2019-11-24 16:02:12 -05:00
Carsten Hartenfels
b9aa14d25e Add a test for struct type initializers
To make sure that they all work properly and none of them trigger
warnings.
2019-11-24 16:02:12 -05:00
Carsten Hartenfels
8ad273475f Make GLMS_ initializers use the GLM_ versions
So that we don't write them twice. More consistent this way.
2019-11-24 16:02:03 -05:00
Carsten Hartenfels
c8211b3a62 Re-order struct type contents array-first
So that initializers will prefer the array entry, rather than trying to
initialize the anonymous struct.
2019-11-24 16:01:55 -05:00
Carsten Hartenfels
11dae5126b Add braces around matrix struct intializers
They're missing and trigger warnings in the tests.
2019-11-24 13:32:35 -05:00
Carsten Hartenfels
390a5035a8 Use gnu11 instead of gnu99 to get rid of warnings
CGLM uses anonymous structs, which is a C11 feature. When trying to
build the tests in C99 mode, you get warnings to that effect. Switching
to C11 fixes this.
2019-11-24 13:32:35 -05:00
Carsten Hartenfels
267348af03 Build tests with the same flags as the library
In particular, with the same warning flags. That means it now warns
about a few things during compilation that the following commits are
gonna fix.
2019-11-24 13:32:35 -05:00
Carsten Hartenfels
f9abf2a7df Don't add default autoconf flags to build
By default, it adds something like `-O2 -g` to the cflags. That
conflicts with the flags in Makefile.am, which specifies -O3. This
commit removes the default flags so we only get what we actually
specify.
2019-11-24 13:32:35 -05:00
Recep Aslantas
f0ffef7820 Merge pull request #110 from hartenfels/vec2s
Add a vec2s struct type for consistency
2019-11-24 17:18:50 +03:00
Carsten Hartenfels
4b9b7aeb20 Add a vec2s struct type for consistency
There's a vec2 type, so there should probably be a struct version of it
too. Even if no functions use it right now, if a library user (like me)
needs a 2-element vector, they don't need to roll their own.
2019-11-23 14:37:48 -05:00
Recep Aslantas
1a74361dfb Merge pull request #109 from hartenfels/prototypes
Change `()` Prototypes to `(void)`
2019-11-23 19:18:52 +03:00
Carsten Hartenfels
c83f25343f Error out on invalid empty prototypes
This way, a function prototype like `glms_mat3_identity()` will not
compile, instead you have to change it to the proper
`glms_mat3_identity(void)`.
2019-11-23 10:10:27 -05:00
Carsten Hartenfels
f3ea5b4f3e Change empty prototypes to (void)
Because () means an arbitrary number of arguments in C, which is not
intended here.
2019-11-23 10:10:17 -05:00
Recep Aslantas
9987e1374b build: remove duplicate entry in makefile
close #108
2019-11-17 10:22:01 +03:00
Recep Aslantas
464b2178ce Update README.md 2019-11-08 17:14:24 +03:00
Recep Aslantas
c253769fcd Update applesimd.h 2019-11-07 22:43:47 +03:00
Recep Aslantas
b893c79086 Update Makefile.am 2019-11-07 22:41:41 +03:00
Recep Aslantas
2336256808 Helpers for apple's simd library (#107)
* helper to convert cglm matrix to Apple's simd type
2019-11-07 22:32:15 +03:00
onagurna
52df54e306 fix typo in README (#106) 2019-10-21 23:46:23 +03:00
Recep Aslantas
381e66349a win,test: fix test build for windows and suppress warnings 2019-10-14 19:08:34 +03:00
Recep Aslantas
7cdeada701 tests: add test for glm_quat_look 2019-09-27 17:53:51 +03:00
Recep Aslantas
841257a208 tests: add test for quat_slerp 2019-09-26 19:57:00 +03:00
Recep Aslantas
212cf3b22d Update test_quat.h 2019-09-26 19:29:45 +03:00
Recep Aslantas
ca9b8ceac3 tests: add some tests for quat 2019-09-25 14:03:58 +03:00
Recep Aslantas
5b0e161502 tests: add some tests for quat 2019-09-25 13:47:26 +03:00
Recep Aslantas
fb23d1998e tests: add more tests for quat 2019-09-25 12:43:01 +03:00
Recep Aslantas
b2084fbacf tests: add some tests for quat 2019-09-25 07:42:29 +03:00
Recep Aslantas
2ea9308361 quat: fix glmc_quat_normalize() 2019-09-25 07:41:29 +03:00
Recep Aslantas
56cbacd9f6 tests: add missing test for vec4 2019-09-24 21:45:43 +03:00
Recep Aslantas
1700187f65 tests: add more tests for vec4 2019-09-24 19:10:44 +03:00
Recep Aslantas
36024367bc tests: add more tests for vec4 2019-09-24 17:02:47 +03:00
Recep Aslantas
dcf5b5c1c4 vec: fix min/max for compiled vec3 2019-09-24 17:01:56 +03:00
Recep Aslantas
ce09e543ef tests: add some tests for vec4 2019-09-24 16:33:42 +03:00
Recep Aslantas
f2073b2277 tests: add more tests for vec3 2019-09-23 22:46:45 +03:00
Recep Aslantas
7c10840a85 tests: add more tests for vec3 2019-09-23 22:39:53 +03:00
Recep Aslantas
37c2650b0a tests: add more tests for vec3 2019-09-23 12:03:06 +03:00
Recep Aslantas
3a48e4cd84 tests: add more tests for vec3 2019-09-22 23:32:57 +03:00
Recep Aslantas
378e26140e tests: add more tests for vec3 2019-09-22 23:25:54 +03:00
Recep Aslantas
7b25cbb9cb vec: fix min/max for compiled vec3 2019-09-22 23:25:33 +03:00
Recep Aslantas
bffe103c37 tests: add more tests for vec3 (rotations) 2019-09-22 22:27:28 +03:00
Recep Aslantas
51ffe09589 tests: use test_eq insteaf og glm_eq 2019-09-22 22:27:05 +03:00
Recep Aslantas
d7b37ba245 tests: add some test for project/unproject 2019-09-22 10:52:02 +03:00
Recep Aslantas
d0671b3e7a tests: add missing test for mat4 2019-09-21 14:01:20 +03:00
Recep Aslantas
e98311259c tests: fix some tests for vec3 2019-09-20 22:45:07 +03:00
Recep Aslantas
37cf6b3206 tests: add more tests for vec3 2019-09-20 22:30:32 +03:00
Recep Aslantas
a062f002a0 add codecov badge 2019-09-20 21:16:25 +03:00
Recep Aslantas
9c57d4b247 tests: add more tests for vec3 2019-09-20 14:12:57 +03:00
Recep Aslantas
9fe5efb410 tests: add more tests for vec3 2019-09-19 16:50:22 +03:00
Recep Aslantas
495afb8a3d Update test_vec3.h 2019-09-19 16:16:41 +03:00
Recep Aslantas
ba694f4aec tests: add some tests for vec3 2019-09-19 16:12:27 +03:00