Skip to content

Update to load function pointers for GDExtension interface #1095

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

Merged
merged 1 commit into from
May 16, 2023

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Apr 24, 2023

This is a companion to this Godot PR godotengine/godot#76406

It uses the new GDExtension interface to load function pointers from that PR, however, I did so in the way that would add the fewest changes possible. So, for example, it ends up loading the function pointers into a big struct like it used to. However, similar to OpenGL, I think it'd be nicer if it loaded them into global variables that we could just call, like gdextension_interface_get_godot_version() as opposed to internal::gde_interface->get_godot_version().

Additionally, it adds some code that attempts to prevent loading newer GDExtensions with older versions of Godot (needs some more extensive testing)

Keeping as a draft until we have consensus that the above PR is the right high-level approach, and then I'll spend some time cleaning it up

UPDATE: This PR is now ready for review!

@dsnopek dsnopek requested a review from a team as a code owner April 24, 2023 16:50
@dsnopek dsnopek force-pushed the gdextension-interface branch 3 times, most recently from b96f722 to 79b8cdb Compare April 25, 2023 16:49
@dsnopek dsnopek marked this pull request as draft April 26, 2023 15:35
@dsnopek dsnopek force-pushed the gdextension-interface branch from 79b8cdb to bb54c12 Compare May 1, 2023 21:53
@Calinou Calinou added enhancement This is an enhancement on the current functionality topic:gdextension This relates to the new Godot 4 extension implementation labels May 1, 2023
@dsnopek dsnopek force-pushed the gdextension-interface branch from bb54c12 to a0765e6 Compare May 10, 2023 02:42
@dsnopek dsnopek marked this pull request as ready for review May 10, 2023 02:43
@dsnopek dsnopek changed the title [Draft] Update to load function pointers for GDExtension interface Update to load function pointers for GDExtension interface May 10, 2023
@dsnopek dsnopek force-pushed the gdextension-interface branch from a0765e6 to a5c6ca5 Compare May 10, 2023 02:45
@dsnopek
Copy link
Collaborator Author

dsnopek commented May 10, 2023

With my latest push, this PR now has everything I wanted to get in there, so I'm taking it out of draft!

@dsnopek
Copy link
Collaborator Author

dsnopek commented May 13, 2023

Discussed at the GDExtension meeting, and approved along with godotengine/godot#76406

@akien-mga akien-mga merged commit 1c18413 into godotengine:master May 16, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:gdextension This relates to the new Godot 4 extension implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants