Commit Graph

17 Commits

Author SHA1 Message Date
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Gilles Roudière 4fc0fb826a Change gdnative interface so that Godot object initialization should be triggered from the extension side 2021-11-30 16:55:48 +01:00
bruvzg f214b2b194 [GDExtension] Implement missing Dictionary index operators.
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2021-11-22 12:43:00 +02:00
Colin Kinloch a66e59be84 Add typedef to GDNativeInstanceBindingCallbacks 2021-10-07 11:59:18 +01:00
Fabio Alessandrelli f9ce9a8e10 [ClassDB] Unify construct/extension retrieval. 2021-09-22 18:33:29 +02:00
Fabio Alessandrelli f724bd1880 [Core] Add ClassDB functions to retrieve/construct extensions.
Calling the constructor alone is not enough if the class to be
instantiated is not a base class.

This commit adds two functions, one for retrieving the the extension
class reference, the other to construct an instance using the
constructor and the extension class reference.
2021-09-22 17:46:08 +02:00
Rémi Verschelde 104a6191fd
Merge pull request #52739 from BastiaanOlij/gdextension_array_index 2021-09-16 15:15:02 +02:00
Bastiaan Olij 25d0e4bb5b Add GD extensions operator functions for arrays 2021-09-16 22:00:51 +10:00
Bastiaan Olij 12868791f2 Add property group and subgroup registration to extensions 2021-09-16 12:37:43 +10:00
Bastiaan Olij f9849a2717 Add driver types to GD extension initialisation levels 2021-09-13 18:50:00 +10:00
Bastiaan Olij 23f27fbffc Add functions for access members by index on packed array objects 2021-09-02 09:41:35 +10:00
George Marques fcfea84d5e
A few fixes in the extension C API
- Add MethodBind call (besides ptrcall), since vararg methods don't work
  with ptrcall.
- Fix argument name in register constant function to the way it
  actually is used in the engine.
- Change the integer constant type to GDNativeInt to keep it consistent.
2021-08-17 18:10:58 -03:00
George Marques ee6e05ee68
Rename GDNative call error enum values to use GDNATIVE prefix
To make sure it does not clash with other libraries.
2021-08-09 19:21:37 -03:00
George Marques 3f362cec68
Improve extension system
- Fix library loading and initialization.
- Add extra methods/parameters in the interface needed by extenstions.
- Add Variant destructors and functions for extracting values and
  creating Variants from values.
2021-08-05 14:57:31 -03:00
George Marques 84c37423fb
Change Variant bool conversion to uint8_t
This ensures more portable conversion since not every path assume bool
is 32-bits and there's no loss converting to 8-bits anyway.
2021-07-27 09:00:56 -03:00
reduz 4469144891 Redo how instance bindings work
* The harcoded 8 slots are no more and impose limits in the new extension system.
* New system is limitless, although it will impose small performance hit with a mutex.
* Use a token to request the instance binding.

**Warning**: Mono will most likely break as a result of this, will need to be modified to use the new system.
2021-07-08 17:08:12 -03:00
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00