gdmemory

package
v0.0.0-...-0d6c339 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 3 Imported by: 0

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

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 Int64frombits(bits uint64) int64

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL