-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Implement callable_mp()
and callable_mp_static()
#1155
Conversation
b95f34a
to
46b5cf4
Compare
callable_mp()
and callable_mp_static()
callable_mp()
and callable_mp_static()
Unfortunately, the tests will fail on GitHub CI until the Godot PR is merged. |
This looks great! This will remove the need for a (registered) dummy "factory" class/method to register a physics server from a GDExtension, and allow using a static callback instead, as it's done in core. cc @mihe for Godot-Jolt. |
I have been waiting for this. |
I just updated this to work with @maiself's alternative PR godotengine/godot#79005 |
The upstream PR was merged, so this can be revisited. |
f8c48a4
to
128f45b
Compare
I've just rebased this on the latest master. It should finally pass tests (which include some unit tests actually using As discussed on this comment, I would like to expand what godot-cpp does with the new custom callable API that was added in Godot:
But I think that can be saved for a follow-up PR. What's added here is already super useful, and it doesn't get in the way of expanding the functionality later. |
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.
Reviewed during GDExtension meeting, this is looking really good!
128f45b
to
581ce30
Compare
581ce30
to
c18c191
Compare
This is the godot-cpp counterpart to PR godotengine/godot#79005 (which this PR depends on).
It very minimally works! It adds a single test case that passes :-)
However, it's a draft because:1. I want to add more test cases to ensure it works with void functions and const methods that return a value2. I haven't addedcallable_mp_static()
yetThis is now ready for review and has full test coverage!
Unfortunately, the tests will fail on GitHub CI until the Godot PR is merged.
Fixes #1089