OpenXRFutureExtension

package
v0.0.0-...-357ca8a Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

This is a support extension in OpenXR that allows other OpenXR extensions to start asynchronous functions and get a callback after this function finishes. It is not intended for consumption within GDScript but can be accessed from GDExtension.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsOpenXRFutureExtension() Instance
}

type Expanded

type Expanded = MoreArgs

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsOpenXRExtensionWrapper

func (self *Extension[T]) AsOpenXRExtensionWrapper() OpenXRExtensionWrapper.Instance

func (*Extension[T]) AsOpenXRFutureExtension

func (self *Extension[T]) AsOpenXRFutureExtension() Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.OpenXRFutureExtension

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsOpenXRExtensionWrapper

func (self Instance) AsOpenXRExtensionWrapper() OpenXRExtensionWrapper.Instance

func (Instance) AsOpenXRFutureExtension

func (self Instance) AsOpenXRFutureExtension() Instance

func (Instance) CancelFuture

func (self Instance) CancelFuture(future int)

Cancels an in-progress future. 'future' must be an XrFutureEXT value previously returned by an API that started an asynchronous function.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsActive

func (self Instance) IsActive() bool

Returns true if futures are available in the OpenXR runtime used. This function will only return a usable result after OpenXR has been initialized.

func (Instance) MoreArgs

func (self Instance) MoreArgs() MoreArgs

MoreArgs enables certain functions to be called with additional 'optional' arguments.

func (Instance) RegisterFuture

func (self Instance) RegisterFuture(future int) OpenXRFutureResult.Instance

Register an OpenXR Future object so we monitor for completion. 'future' must be an XrFutureEXT value previously returned by an API that started an asynchronous function.

You can optionally specify 'on_success', it will be invoked on successful completion of the future.

Or you can use the returned OpenXRFutureResult object to await its OnOpenxrfutureresult.Completed signal.

var future_result = openXRFutureExtension.RegisterFuture(future)
future_result.OnCompleted(func(result OpenXRFutureResult.Instance) {
	if result.GetStatus() == OpenXRFutureResult.ResultFinished {
		// Handle your success
	}
}, Signal.OneShot)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type MoreArgs

type MoreArgs [1]gdclass.OpenXRFutureExtension

MoreArgs is a container for Instance functions with additional 'optional' arguments.

func (MoreArgs) RegisterFuture

func (self MoreArgs) RegisterFuture(future int, on_success func()) OpenXRFutureResult.Instance

Register an OpenXR Future object so we monitor for completion. 'future' must be an XrFutureEXT value previously returned by an API that started an asynchronous function.

You can optionally specify 'on_success', it will be invoked on successful completion of the future.

Or you can use the returned OpenXRFutureResult object to await its OnOpenxrfutureresult.Completed signal.

var future_result = openXRFutureExtension.RegisterFuture(future)
future_result.OnCompleted(func(result OpenXRFutureResult.Instance) {
	if result.GetStatus() == OpenXRFutureResult.ResultFinished {
		// Handle your success
	}
}, Signal.OneShot)

Jump to

Keyboard shortcuts

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