-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
New GDNative API #524
New GDNative API #524
Conversation
This uses the new GDNative API from Godot 4. Major change is in the ability to wrap the builtin types as well, so we don't have to implement wrappers manually anymore (not on Godot side nor here). The bindings generator now takes that into account to create the new wrappers, including a case for utility functions, which are also exposed from Godot (like print() which now should be called from Utilities). A few special functions are still provided for convenience, like print_error(). Some builtin types that are used in math are reimplemented here with a copy from Godot source (with a few compatibility changes). This is so you can make use of inlined functions. It is possible that this might cause problems when marshalling from or to the engine, given difference in memory alignment between compilers. I haven't experienced this and that was pretty much already the case before, so it shouldn't be a problem.
@vnen which upstream PRs in Godot itself need to be merged for this to work? Are they already merged? |
Fixed up some compile issues
@vnen we should probably squash those commits. it's going to be a nightmare rebasing this with all the class name changes... |
Rename Transform, Quat and Reference to new names
In particular for default values. This also unifies the parsing for the class API and the builtin types API so they use the same function.
Not much point keeping this open (kinda regret doing this since it was mostly a waste of time). Godot 4.0 will use extensions which follow a very different API. I did a good amount of groundwork in my fork for the new system: https://github.com/vnen/godot-cpp/tree/gdnative-extensions if anyone wants to check. Eventually there'll be a PR for that. |
See #602 for the new system. |
This still a draft since it needs a few PRs to be merged in Godot itself, which will then allow
godot-headers
to be updated as well so it can be referenced here. That will certainly make the CI fail until that is done.This is a big change but it doesn't really change how you would use this so it should be a seamless update apart from the changes in the API itself that Godot 4 is bringing,
This uses the new GDNative API from Godot 4. Major change is in the
ability to wrap the builtin types as well, so we don't have to
implement wrappers manually anymore (not on Godot side nor here).
The bindings generator now takes that into account to create the new
wrappers, including a case for utility functions, which are also exposed
from Godot (like print() which now should be called from Utilities).
A few special functions are still provided for convenience, like
print_error().
Some builtin types that are used in math are reimplemented here with a
copy from Godot source (with a few compatibility changes). This is so
you can make use of inlined functions. It is possible that this might
cause problems when marshalling from or to the engine, given difference
in memory alignment between compilers. I haven't experienced this and
that was pretty much already the case before, so it shouldn't be a
problem.