-
-
Notifications
You must be signed in to change notification settings - Fork 686
Add double precision build support. #728
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
Conversation
|
Tested with the demo project, seems to be working fine. 64-bit float engine crashes when 32-bit float library is loaded. 32-bit float engine seems to be able to load 64-bit float version, but some values probably will be corrupted. Seems like there's no easy way to check engine / library float size in the runtime (might be worth adding a function to do so, and reject library loading if size do not match). |
f155198 to
4bec82e
Compare
CMakeLists.txt
Outdated
| # godot-cpp cmake arguments | ||
| # GODOT_HEADERS_DIR: This is where the gdnative include folder is (godot_source/modules/gdnative/include) | ||
| # GODOT_CUSTOM_API_FILE: This is if you have another path for the godot_api.json | ||
| # FLOAT_TYPE Floating-point precision (float, double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should be tab aligned to match the above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, should this be 32/64 to match the SCons option?
| shutil.rmtree(target_dir, ignore_errors=True) | ||
| target_dir.mkdir(parents=True) | ||
|
|
||
| print("Built-in type config: " + double + "_" + bits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need to get rid of this bits thing and properly use arch, this it pretty confusing IMO.
@Faless has some WIP for it IINM, pending on reviewing/approving godotengine/godot#55778
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akien-mga Here's a PR for the godot-cpp repo for master: #759
|
Thanks! |
Adds double precision build support (using
float=64build flag). Fix config selection for 32-bit builds (was hard-coded to 64-bit).