forked from godotengine/godot-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add pointers support for virtual methods. #32
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The extension creators then don't need to create those just to redirect to the bindings.
Fixed windows compile (MSVC) and moved test project files
Use, e.g. Engine::get_singleton() to get the singleton object();
Remove unused import that breaks on windows
Silence delete compile warning in memory.h/cpp on Windows
Fix add_custom_command OUTPUT paths
Do not override build path
Fix variadic return
Fix print file list
Bindings are generated using `generate_bindings` and the command contains the `COMMENT` parameter, which will display a message about the generation.
This should eventually be configurable with user callbacks, but for now assume the lowest level to ensure the initialization is called.
Minor CMake fixes
Convert float to double even if `meta` is set to float.
…in_type_code Re-introduce build-in type code for core types
Now it needs a callback for each level so custom logic (like loading singletons) can be performed.
Add in driver types and rejig code to make it easier to extend
…p_macro Add support for property groups
This makes sure custom constructors are always called on extension classes. However, note that constructors should not take any parameters, since Godot doesn't support that. Parameters are ignore in memnew macro. Use memnew(MyClass()) instead of memnew(MyClass) since it now needs a value instead of a class name. This macro calls MyClass::_new() (define in GDCLASS macro) which ultimately calls Godot to create the object, ensuring that both the Godot and the extension instances are created. Non Godot classes (that don't derive godot::Object) are constructed as usual an can have parameters. memdelete is also changed for the same reason, as it needs to destroy the Godot object as well, and that automatically frees the bound extension instance.
{ 0 } initializes only first element with zero explicitly and other elements with their default value (zeros too). Technically it will work the same, but will be more correct.
…issues Fix some clang format things
_err_print_error only output p_message so swapped parameters around
It didn't set the return value at all, changing the local value instead. Now instead correctly sets it as a generic pointer type from `_owner`.
…uctor Add virtual destructor to Object class
Use default initialization
Fix PtrToArg encoding for `Object *`.
BastiaanOlij
force-pushed
the
gdnative-extensions
branch
3 times, most recently
from
September 27, 2021 13:08
5b49003
to
d5e0fc8
Compare
Superseded by: godotengine#625 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As introduced in godot for virtual methods.
Custom structs are not yet supported.