Documentation
¶
Overview ¶
Package gdmemory provides functions for transferring data between Go and the graphics engine.
This package is primarily used on platforms where the extension is running in a different address space, ie. web/wasm.
Index ¶
- func CopyArguments[T any](shape gdextension.Shape, args gdextension.CallAccepts[T]) gdextension.Pointer
- func CopyBufferToEngine(buf []byte) gdextension.Pointer
- func CopyBufferToGo(ptr gdextension.Pointer, buf []byte)
- func CopyReceiver[T any](shape gdextension.Shape, self gdextension.CallMutates[T]) gdextension.Pointer
- func CopyVariants[T any](args gdextension.CallAccepts[T], n int) gdextension.Pointer
- func Get[T gdextension.AnyVariant](frame gdextension.Pointer) T
- func IndexVariants(ptr gdextension.Accepts[gdextension.Variant], len, idx int) gdextension.Variant
- func Int64frombits(bits uint64) int64
- func IntoSlice[T gdextension.Packable](ptr gdextension.Pointer, len int) []T
- func LoadResult[T ~unsafe.Pointer](shape gdextension.Shape, result T, from gdextension.Pointer)
- func LoadSlice[T gdextension.Packable](ptr gdextension.Pointer, slice []T)
- func MakeResult(shape gdextension.Shape) gdextension.Pointer
- func Set[T gdextension.AnyVariant](frame gdextension.Pointer, value T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyArguments ¶
func CopyArguments[T any](shape gdextension.Shape, args gdextension.CallAccepts[T]) gdextension.Pointer
CopyArguments copies arguments from args to the arguments buffer, respecting Go's alignment rules.
func CopyBufferToEngine ¶
func CopyBufferToEngine(buf []byte) gdextension.Pointer
func CopyBufferToGo ¶
func CopyBufferToGo(ptr gdextension.Pointer, buf []byte)
func CopyReceiver ¶
func CopyReceiver[T any](shape gdextension.Shape, self gdextension.CallMutates[T]) gdextension.Pointer
CopyReceiver copies the receiver into the receiver buffer, respecting Go's alignment rules.
func CopyVariants ¶
func CopyVariants[T any](args gdextension.CallAccepts[T], n int) gdextension.Pointer
func Get ¶
func Get[T gdextension.AnyVariant](frame gdextension.Pointer) T
func IndexVariants ¶
func IndexVariants(ptr gdextension.Accepts[gdextension.Variant], len, idx int) gdextension.Variant
func Int64frombits ¶
func IntoSlice ¶
func IntoSlice[T gdextension.Packable](ptr gdextension.Pointer, len int) []T
func LoadResult ¶
func LoadResult[T ~unsafe.Pointer](shape gdextension.Shape, result T, from gdextension.Pointer)
func LoadSlice ¶
func LoadSlice[T gdextension.Packable](ptr gdextension.Pointer, slice []T)
func MakeResult ¶
func MakeResult(shape gdextension.Shape) gdextension.Pointer
func Set ¶
func Set[T gdextension.AnyVariant](frame gdextension.Pointer, value T)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.