summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix "_instance_bindings != nullptr" for Wrapped objects.Fabio Alessandrelli2022-07-291-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_argsFabio Alessandrelli2022-07-292-4/+4
|\ | | | | Fixed pointer indirection in the PtrToArg template for Object arguments.
| * Fix for pointer indirection in the Ref<T> template.Lukas Tönne2022-01-071-2/+2
| | | | | | | | Patch by Nana Sakisaka (saki7).
| * Fixed pointer indirection in the PtrToArg template for Object arguments.Lukas Tönne2022-01-021-2/+2
| |
* | fix: Object::cast_to checks provided object for nullptrDNKpp2022-07-261-0/+3
| |
* | Add bindings for Vector4, Vector4i, Projection built-in types.bruvzg2022-07-2113-220/+1277
| |
* | Merge pull request #686 from ondy-personal/patch-1Rémi Verschelde2022-07-181-0/+3
|\ \
| * | Fixed crash when called methods return nullptr.ondy-personal2022-01-311-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.bruvzg2022-07-113-1/+72
| | |
* | | Fix crash when using static methods without return valueAlessandro Famà2022-07-031-1/+5
| | |
* | | Fix GDN_EXPORT define with mingw.Fabio Alessandrelli2022-06-181-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.bruvzg2022-06-067-414/+1083
| | |
* | | Cast `Variant::Type` to `GDNativeVariantType`Teodor Potancok2022-05-172-7/+7
| | |
* | | [Method Bind] Add support for default argument values and static method ↵bruvzg2022-05-064-13/+284
| | | | | | | | | | | | binding. Sync headers.
* | | Add double precision build support.bruvzg2022-05-041-15/+15
| | |
* | | Change registered initializers / terminators to the single function with ↵bruvzg2022-05-041-13/+14
| | | | | | | | | | | | level argument.
* | | Color: Rename to_srgb/to_linear to include base color spaceRémi Verschelde2022-04-131-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.bruvzg2022-03-301-34/+80
| | |
* | | Sync godot-headers and fix build after "Create GDExtension clases for ↵bruvzg2022-03-161-0/+22
| | | | | | | | | | | | PhysicsServer3D".
* | | Fix build after "Discern between VIRTUAL and ABSTRACT class bindings".bruvzg2022-03-151-1/+2
| | |
* | | Update copyright yearRémi Verschelde2022-03-1551-102/+102
| | |
* | | Add `ObjectDB::get_instance` method to get wrapped `Object *` from `ObjectID`.bruvzg2022-03-081-0/+11
| | |
* | | Fixed crash on release builds due to missing argument type informationMelissa Geels2022-03-021-8/+0
| | |
* | | Reorder native extension initialization stepsGilles Roudière2022-02-281-2/+2
| | |
* | | Merge pull request #708 from Zylann/fix_inheriting_class_with_namespaceRémi Verschelde2022-02-211-2/+6
|\ \ \
| * | | Fix GDCLASS when inherited class is in another namespaceMarc Gilleron2022-02-201-2/+6
| | | |
* | | | Merge pull request #701 from bruvzg/port_templatesRémi Verschelde2022-02-2122-1/+7230
|\ \ \ \ | |/ / / |/| | |
| * | | Port a bunch of Godot container templates to GDExtension.bruvzg2022-02-1822-1/+7230
| | | |
* | | | Use forward declares for vector math typesRémi Verschelde2022-02-206-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/masterRémi Verschelde2022-02-191-0/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Add missing Vector2::operator Vector2i()Zhehang Ding2022-02-071-0/+1
| |/ /
* | | Add ERR_ macros variants using `String` messages.bruvzg2022-02-171-0/+6
| | |
* | | Fix "const" NativePtr binds.bruvzg2022-02-161-21/+21
| | |
* | | Add `ptr()` / `ptrw()` to the arrays, add missing `String` methods, add ↵bruvzg2022-02-1415-37/+75
|/ / | | | | | | missing `CharString` method implementations.
* | Merge pull request #668 from groud/fix_extension_instance_setRémi Verschelde2022-01-061-19/+2
|\ \
| * | Fix object_set_instance being wrongly called for built-in wrapped classesGilles Roudière2021-12-061-19/+2
| | |
* | | Normalized additional macros to ensure that everything works without client ↵Bradley Clemetson2021-12-182-7/+7
| |/ |/| | | | | code needing using
* | Fix namespace to be consistent with the previous ADD functionsBradley Clemetson2021-12-121-2/+2
|/
* Make extension instances create the corresponding godot object in their ↵Gilles Roudière2021-12-034-166/+140
| | | | constructor
* Fixing compiler warnings around implicit type casting loosing precisionBastiaan Olij2021-11-2210-69/+73
|
* Add Array:make macroBastiaan Olij2021-11-021-0/+50
|
* Rename interface to gdn_interface because it's a defined keyword under windowsBastiaan Olij2021-10-289-136/+136
|
* Merge pull request #631 from Faless/ext/ref_casting_2Rémi Verschelde2021-09-281-0/+43
|\
| * Add Ref<T> binding support.Fabio Alessandrelli2021-09-281-0/+43
| | | | | | | | Added PtrToArg and GetTypeInfo adapted from Godot.
* | Add pointers support for virtual methods.Fabio Alessandrelli2021-09-271-0/+41
|/ | | | | As introduced in godot for virtual methods. Custom structs are not yet supported.
* Fully register class on register_class callBastiaan Olij2021-09-271-14/+36
|
* Implement Ref copy constructorBastiaan Olij2021-09-271-20/+39
|
* Fix encoding/decoding of null objects.Fabio Alessandrelli2021-09-271-2/+2
|
* Fix binding of function that takes Object * parameters.Fabio Alessandrelli2021-09-271-2/+2
|
* Fix creation (and godot-side deletion) of extended objects.Fabio Alessandrelli2021-09-271-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`.