Skip to content

Update for GDExtension interface changes in Godot 4.5 #1792

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Jun 16, 2025

This updates the gdextension_interface.h to match what's currently in Godot master (and will become part of Godot 4.5), and also attempts to make use of the newer functions, such that we aren't using any deprecated functions.

I also added support for the startup, frame and shutdown callbacks from PR godotengine/godot#106030

This allowed me to test that those callbacks work as expected, although, I didn't add any automated tests using them in this PR, since I'm not sure how we could effectively do that.

The comment changes in gdextension_interface.h from PR godotengine/godot#107594 are included here as well, so this shouldn't be merged until after that PR is.

UPDATE: That PR was merged! This PR has been updated with the latest version from it.

Fixes #1791

@dsnopek dsnopek added this to the 4.x milestone Jun 16, 2025
@dsnopek dsnopek requested a review from a team as a code owner June 16, 2025 16:27
@dsnopek dsnopek added the enhancement This is an enhancement on the current functionality label Jun 16, 2025
@dsnopek dsnopek force-pushed the gdextension-interface-45 branch from fdcbf5d to bb349af Compare June 16, 2025 16:38
@dsnopek dsnopek force-pushed the gdextension-interface-45 branch from bb349af to f402a21 Compare June 20, 2025 17:39
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straight forward :)

Comment on lines +270 to +272
void register_startup_callback(GDExtensionMainLoopStartupCallback p_callback) const;
void register_frame_callback(GDExtensionMainLoopFrameCallback p_callback) const;
void register_shutdown_callback(GDExtensionMainLoopShutdownCallback p_callback) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could use a comment, when (and why) exactly they're called in context of other functions.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

require support no-deprecated
2 participants