Open
Description
godot-cpp: ad11bbb5845a454551d490812631922c33b7601c
godot: godotengine/godot#52192
Some missing API functions and discrepancies found during attempt to port TextServerAdvanced
to the GDExtension
(as part of godotengine/godot#52192):
String
:missingptr
,ptrw
methods.missing+
,+=
operators.
StringName
do not expose<
and>
operators, and unusable as map key.Packed*Arrray
:missingptr
,ptrw
methods.[]
operator API difference with the engine ([]
vs.write[]
).
Dictionary
:missing[]
operator.seems to have no methods to write value at all.
Char*String
:no public constructors.
RID
:nois_valid
method.noIncluded in Port a bunch of Godot container templates to GDExtension. #701.RID_*_Owner
implementation, can be copy-pasted locally from the engine with minimal changes, but probably should be part of godot-cpp.
Mutex
andSemaphore
:lock
andunlock
methods aren'tconst
.noIncluded in Port a bunch of Godot container templates to GDExtension. #701.MutexLock
class and_THREAD_SAFE_
macros defined (can be added locally, but probably should be part of godot-cpp).
memnew
,memdelete
aren't working with non-Godot classes.nomemalloc
,memfree
macros defined (can be added locally):#define memalloc(m_size) Memory::alloc_static(m_size) #define memrealloc(m_mem, m_size) Memory::realloc_static(m_mem, m_size) #define memfree(m_mem) Memory::free_static(m_mem)
Enum type return values can't be bound on the engine side.Enum type argument types can't be bound, unless conversion macros is added manually-MAKE_PTRARGCONV(TextServer::Direction, int64_t);
.Missing math defines,MAX
,MIN
,CLAMP
etc.No conversion for custom native pointer types, can be fixed locally by addingGDVIRTUAL_NATIVE_PTR(Glyph *);
macro.No templates forIncluded in Port a bunch of Godot container templates to GDExtension. #701.Vector
,Map
,List
,HashMap
,Set
, not a critical issue, but would be convenient to have for better module <-> GDExtension portability.