-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call API doesn't support macro definitions #454
Comments
Hi @Lephar Thanks for reporting this, Actually all RH and LH functions will be compiled into same binary. The problem is that for instance For now you can access LH/RH NO/ZO functions in full name like
Let’s get some feedback to get ideas on how to handle this |
Thanks for replying! Calling the RH/LH NO/ZO seems like the right choice for me right now. I can think of some disadvantages for both options:
So yeah, let's wait for more feedback. |
Maybe we can inline default clipspace functions like glmc_perspective(...) {
#ifdef CGLM_FORCE_LEFT_HANDED
#ifdef CGLM_FORCE_DEPTH_ZERO_TO_ONE
glmc_perspective_lh_zo(...)
#else
glmc_perspective_lh_no(...)
#endif
#else
...
#endif
} This approach doesn't cause neither of the problems I've mentioned but the default |
This is good approach, +1 for this. The only problem may be direct replacement of new binary would cause linker error for dynamic lib, but still better and robust than existing solution. Maybe we can get more feedback on a PR :) |
While it's possible to use CGLM like this:
the following code doesn't work as expected:
since the function bodies are already compiled.
It is possible to make it work by editting
CMakeListst.txt
/Makefile
or with the tricks likeC_FLAGS
definitions while building but I've scanned the documentation/repository for clues and haven't found any official way to do it. If that's not the case please point me to the right direction, otherwise I am willing to contribute after a discussion about the proper way to implement it.The text was updated successfully, but these errors were encountered: