This is a repo to hold the generated code which is used for the Toxin GDExtension wrapper. This includes:
- class MethodBinds - (A class which amongst other things contains a pointer to the C++ method)
- class property getter/setter
- builtin constructor/destructor
- enums
- bitsets
- Virtual info structs and their init code
- class constants (as enums)
- Vararg method signatures (Untested)
WARNING! In Godot itself some class structs and enums may have the same names but have different values. This is why there are individual enums for each class.
- GDWrapper with gdAPI and gdextension included as children.
- This library is setup expecting GDWrapper imported from the Odin shared folder
To import a class's bindings
- create the class_Methods_list struct
- call class_Init_(&your_class_Methods_list)
- if there are arguments, prepare those.
- if there is a return, create a return variable for the value
- Call your_class_Methods_list.some_method->m_call(class.self, {&arg1, &arg2} &ret_val)
Classes.Node2D_Init_(&Node2D_Class)
Node2D_Class.set_position->m_call(class.self, {&Vec2_position})
Node2D_Class: Classes.Node2D_MethodBind_List
The signal lists are not yet included as I have not yet decided on the best course of action for their callbacks. The only option for their use is Variants which... Well it's not a fun time converting to/from those types.
This isn't thoroughly tested, but it raises no compiler warnings. The init procs for some classes have been shown to be working. This will not support looking into inheritance and initializing those. I plan on handling that through the Toxin user layer.