Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fix "_instance_bindings != nullptr" for Wrapped objects. | Fabio Alessandrelli | 2022-07-29 | 1 | -1/+4 | |
| | | | | | | | | | | | | | | | | | | | | | This is an attempt to make the lifecycle of wrapped objects clearer. Godot keeps track of bindings' userdata for each object it creates. This allows allocating the memory of the wrapper only once per object even if that object is passed multiple times between binding code and godot code. The binding information is composed of multiple functions, this includes a callback for when the userdata is to be allocated (called once) and for when the userdata is to be deallocated (again, called once). When allocating data with "memnew" we set the object bindings during the postinitialize phase, but surely we shouldn't do that when allocating the userdata as a result of bindings callback themselves. Additionally, since we let Godot handle (and track) raw memory allocation and de-allocation, we need to manually call the deconstructor of the wrapper class during the free callback, to ensure that its non-trivial members are correctly de-initialized. | |||||
* | Merge pull request #677 from lukas-toenne/fix_object_ptr_args | Fabio Alessandrelli | 2022-07-29 | 2 | -4/+4 | |
|\ | | | | | Fixed pointer indirection in the PtrToArg template for Object arguments. | |||||
| * | Fix for pointer indirection in the Ref<T> template. | Lukas Tönne | 2022-01-07 | 1 | -2/+2 | |
| | | | | | | | | Patch by Nana Sakisaka (saki7). | |||||
| * | Fixed pointer indirection in the PtrToArg template for Object arguments. | Lukas Tönne | 2022-01-02 | 1 | -2/+2 | |
| | | ||||||
* | | fix: Object::cast_to checks provided object for nullptr | DNKpp | 2022-07-26 | 1 | -0/+3 | |
| | | ||||||
* | | Add bindings for Vector4, Vector4i, Projection built-in types. | bruvzg | 2022-07-21 | 13 | -220/+1277 | |
| | | ||||||
* | | Merge pull request #686 from ondy-personal/patch-1 | Rémi Verschelde | 2022-07-18 | 1 | -0/+3 | |
|\ \ | ||||||
| * | | Fixed crash when called methods return nullptr. | ondy-personal | 2022-01-31 | 1 | -0/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The returned value "ret" may be nullptr in which case the code would crash because "object_get_instance_binding" can't be called on nullptr input. This should be very easy to reproduce, I encountered it pretty much any time I called a method that returned Ref<Something>. E.g.: Ref<GeometryInstance3D> instance; instance.instantiate(); instance.get_mesh(); // Crash because no mesh was set for the instance and the returned value was nullptr. | |||||
* | | | Add support for BitField hint, sync API files. | bruvzg | 2022-07-11 | 3 | -1/+72 | |
| | | | ||||||
* | | | Fix crash when using static methods without return value | Alessandro Famà | 2022-07-03 | 1 | -1/+5 | |
| | | | ||||||
* | | | Fix GDN_EXPORT define with mingw. | Fabio Alessandrelli | 2022-06-18 | 1 | -3/+5 | |
| | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the platform detection order to detect mingw compiling for windows (which defines `__GNUC__`). This commit also wraps the definition around a guard so it can be overridden via a define at build-time. | |||||
* | | | Sync containers with new HashMap/HashSet, sync API headers. | bruvzg | 2022-06-06 | 7 | -414/+1083 | |
| | | | ||||||
* | | | Cast `Variant::Type` to `GDNativeVariantType` | Teodor Potancok | 2022-05-17 | 2 | -7/+7 | |
| | | | ||||||
* | | | [Method Bind] Add support for default argument values and static method ↵ | bruvzg | 2022-05-06 | 4 | -13/+284 | |
| | | | | | | | | | | | | binding. Sync headers. | |||||
* | | | Add double precision build support. | bruvzg | 2022-05-04 | 1 | -15/+15 | |
| | | | ||||||
* | | | Change registered initializers / terminators to the single function with ↵ | bruvzg | 2022-05-04 | 1 | -13/+14 | |
| | | | | | | | | | | | | level argument. | |||||
* | | | Color: Rename to_srgb/to_linear to include base color space | Rémi Verschelde | 2022-04-13 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | Counterpart to https://github.com/godotengine/godot/pull/60199. Also syncs the extension API with that PR. | |||||
* | | | Add support for variadic method binds with the typed return. Sync headers. | bruvzg | 2022-03-30 | 1 | -34/+80 | |
| | | | ||||||
* | | | Sync godot-headers and fix build after "Create GDExtension clases for ↵ | bruvzg | 2022-03-16 | 1 | -0/+22 | |
| | | | | | | | | | | | | PhysicsServer3D". | |||||
* | | | Fix build after "Discern between VIRTUAL and ABSTRACT class bindings". | bruvzg | 2022-03-15 | 1 | -1/+2 | |
| | | | ||||||
* | | | Update copyright year | Rémi Verschelde | 2022-03-15 | 51 | -102/+102 | |
| | | | ||||||
* | | | Add `ObjectDB::get_instance` method to get wrapped `Object *` from `ObjectID`. | bruvzg | 2022-03-08 | 1 | -0/+11 | |
| | | | ||||||
* | | | Fixed crash on release builds due to missing argument type information | Melissa Geels | 2022-03-02 | 1 | -8/+0 | |
| | | | ||||||
* | | | Reorder native extension initialization steps | Gilles Roudière | 2022-02-28 | 1 | -2/+2 | |
| | | | ||||||
* | | | Merge pull request #708 from Zylann/fix_inheriting_class_with_namespace | Rémi Verschelde | 2022-02-21 | 1 | -2/+6 | |
|\ \ \ | ||||||
| * | | | Fix GDCLASS when inherited class is in another namespace | Marc Gilleron | 2022-02-20 | 1 | -2/+6 | |
| | | | | ||||||
* | | | | Merge pull request #701 from bruvzg/port_templates | Rémi Verschelde | 2022-02-21 | 22 | -1/+7230 | |
|\ \ \ \ | |/ / / |/| | | | ||||||
| * | | | Port a bunch of Godot container templates to GDExtension. | bruvzg | 2022-02-18 | 22 | -1/+7230 | |
| | | | | ||||||
* | | | | Use forward declares for vector math types | Rémi Verschelde | 2022-02-20 | 6 | -20/+20 | |
| | | | | | | | | | | | | | | | | | | | | Adds operators to convert from int vector types to float vector types as done in the upstream engine implementations. | |||||
* | | | | Merge pull request #688 from zhehangd/master | Rémi Verschelde | 2022-02-19 | 1 | -0/+1 | |
|\ \ \ \ | |/ / / |/| | | | ||||||
| * | | | Add missing Vector2::operator Vector2i() | Zhehang Ding | 2022-02-07 | 1 | -0/+1 | |
| |/ / | ||||||
* | | | Add ERR_ macros variants using `String` messages. | bruvzg | 2022-02-17 | 1 | -0/+6 | |
| | | | ||||||
* | | | Fix "const" NativePtr binds. | bruvzg | 2022-02-16 | 1 | -21/+21 | |
| | | | ||||||
* | | | Add `ptr()` / `ptrw()` to the arrays, add missing `String` methods, add ↵ | bruvzg | 2022-02-14 | 15 | -37/+75 | |
|/ / | | | | | | | missing `CharString` method implementations. | |||||
* | | Merge pull request #668 from groud/fix_extension_instance_set | Rémi Verschelde | 2022-01-06 | 1 | -19/+2 | |
|\ \ | ||||||
| * | | Fix object_set_instance being wrongly called for built-in wrapped classes | Gilles Roudière | 2021-12-06 | 1 | -19/+2 | |
| | | | ||||||
* | | | Normalized additional macros to ensure that everything works without client ↵ | Bradley Clemetson | 2021-12-18 | 2 | -7/+7 | |
| |/ |/| | | | | | code needing using | |||||
* | | Fix namespace to be consistent with the previous ADD functions | Bradley Clemetson | 2021-12-12 | 1 | -2/+2 | |
|/ | ||||||
* | Make extension instances create the corresponding godot object in their ↵ | Gilles Roudière | 2021-12-03 | 4 | -166/+140 | |
| | | | | constructor | |||||
* | Fixing compiler warnings around implicit type casting loosing precision | Bastiaan Olij | 2021-11-22 | 10 | -69/+73 | |
| | ||||||
* | Add Array:make macro | Bastiaan Olij | 2021-11-02 | 1 | -0/+50 | |
| | ||||||
* | Rename interface to gdn_interface because it's a defined keyword under windows | Bastiaan Olij | 2021-10-28 | 9 | -136/+136 | |
| | ||||||
* | Merge pull request #631 from Faless/ext/ref_casting_2 | Rémi Verschelde | 2021-09-28 | 1 | -0/+43 | |
|\ | ||||||
| * | Add Ref<T> binding support. | Fabio Alessandrelli | 2021-09-28 | 1 | -0/+43 | |
| | | | | | | | | Added PtrToArg and GetTypeInfo adapted from Godot. | |||||
* | | Add pointers support for virtual methods. | Fabio Alessandrelli | 2021-09-27 | 1 | -0/+41 | |
|/ | | | | | As introduced in godot for virtual methods. Custom structs are not yet supported. | |||||
* | Fully register class on register_class call | Bastiaan Olij | 2021-09-27 | 1 | -14/+36 | |
| | ||||||
* | Implement Ref copy constructor | Bastiaan Olij | 2021-09-27 | 1 | -20/+39 | |
| | ||||||
* | Fix encoding/decoding of null objects. | Fabio Alessandrelli | 2021-09-27 | 1 | -2/+2 | |
| | ||||||
* | Fix binding of function that takes Object * parameters. | Fabio Alessandrelli | 2021-09-27 | 1 | -2/+2 | |
| | ||||||
* | Fix creation (and godot-side deletion) of extended objects. | Fabio Alessandrelli | 2021-09-27 | 1 | -9/+12 | |
| | | | | | | | | | | | | | | | Proper initialization for godot-cpp classes with memnew. Extension classes (i.e. the `GDCLASS` macro) behave differently from regular wrapped classes, and requires Godot to initialize them during object construction. This commit update the GDCLASS macro to not create/destroy the instance during the bindings callback, but during the extension callbacks. When setting the object instance, the bindings instance is set to the pointer of the extension instance so that it can later be retrieved normally via `object_get_instance_bindings`. |