-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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 NativeExtension pointer arguments #52036
Implement NativeExtension pointer arguments #52036
Conversation
35897ff
to
e66d25d
Compare
So if I understand we can now directly send pointers to Godot by casting them to regular int64 by using this new hint. When it comes to usability, not sure I really get the AudioStream example. |
@CedNaru This is not a way to send generic pointers to Godot, it's a way for Godot to send generic pointer to native extensions. It's only meant for implementations using compiled languages to receive low level data required in some situations (like mixing audio, writing network data buffers, etc). |
I also have no idea if it solves the proposal, the author did not make clear what the intention was with it. |
Hum ok, so this PR won't solve it. |
@CedNaru as written in that proposal, you can cast to integer and back, its not very difficult and makes little difference. |
1d17c0a
to
a1c1f60
Compare
* Allows calling into native extensions directly with a pointer * Makes it easier to implement some APIs more efficiently * Appears with a "*" in the documentation for the argument. * Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint. * AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
a1c1f60
to
44d62a9
Compare
Are the |
Example of how it looks: