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 ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsOpenXRExtensionWrapper() OpenXRExtensionWrapper.Instance
- func (self Instance) AsOpenXRFutureExtension() Instance
- func (self Instance) CancelFuture(future int)
- func (self Instance) ID() ID
- func (self Instance) IsActive() bool
- func (self Instance) MoreArgs() MoreArgs
- func (self Instance) RegisterFuture(future int) OpenXRFutureResult.Instance
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type MoreArgs
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 Extension ¶
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]) AsOpenXRExtensionWrapper ¶
func (self *Extension[T]) AsOpenXRExtensionWrapper() OpenXRExtensionWrapper.Instance
func (*Extension[T]) AsOpenXRFutureExtension ¶
type 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.
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 (Instance) AsOpenXRExtensionWrapper ¶
func (self Instance) AsOpenXRExtensionWrapper() OpenXRExtensionWrapper.Instance
func (Instance) AsOpenXRFutureExtension ¶
func (Instance) CancelFuture ¶
Cancels an in-progress future. 'future' must be an XrFutureEXT value previously returned by an API that started an asynchronous function.
func (Instance) IsActive ¶
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 ¶
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)
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)