Index · Object → OpenXRExtensionWrapper → OpenXRFutureExtension

OpenXRFutureExtension

The OpenXR Future extension allows for asynchronous APIs to be used.

Class Description

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.

Methods

func cancel_future(future: int) -> void

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

func is_active() -> 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 register_future(future: int, on_success: Callable = Callable()) -> OpenXRFutureResult

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 OpenXRFutureResult.completed signal.

var future_result = OpenXRFutureExtension.register_future(future)
await future_result.completed
if future_result.get_status() == OpenXRFutureResult.RESULT_FINISHED:
	# Handle your success
	pass
Inherited from OpenXRExtensionWrapper (47)
func _on_event_polled(event: const void*) -> bool
func _on_instance_created(instance: int) -> void
func _on_instance_destroyed() -> void
func _on_post_draw_viewport(viewport: RID) -> void
func _on_pre_draw_viewport(viewport: RID) -> void
func _on_pre_render() -> void
func _on_process() -> void
func _on_register_metadata(interaction_profile_metadata: OpenXRInteractionProfileMetadata) -> void
func _on_session_created(session: int) -> void
func _on_session_destroyed() -> void
func _on_state_exiting() -> void
func _on_state_focused() -> void
func _on_state_idle() -> void
func _on_state_loss_pending() -> void
func _on_state_ready() -> void
func _on_state_stopping() -> void
func _on_state_synchronized() -> void
func _on_state_visible() -> void
func _on_sync_actions() -> void
func _on_viewport_composition_layer_destroyed(layer: const void*) -> void
func _prepare_view_configuration(view_count: int) -> void
func _set_frame_end_info_and_get_next_pointer(next_pointer: void*) -> int
func _set_frame_wait_info_and_get_next_pointer(next_pointer: void*) -> int
func _set_hand_joint_locations_and_get_next_pointer(hand_index: int, next_pointer: void*) -> int
func _set_instance_create_info_and_get_next_pointer(xr_version: int, next_pointer: void*) -> int
func _set_projection_layer_and_get_next_pointer(next_pointer: void*) -> int
func _set_projection_views_and_get_next_pointer(view_index: int, next_pointer: void*) -> int
func _set_reference_space_create_info_and_get_next_pointer(reference_space_type: int, next_pointer: void*) -> int
func _set_session_create_and_get_next_pointer(next_pointer: void*) -> int
func _set_view_configuration_and_get_next_pointer(view: int, next_pointer: void*) -> int
func _set_view_locate_info_and_get_next_pointer(next_pointer: void*) -> int
func _set_viewport_composition_layer_and_get_next_pointer(layer: const void*, property_values: Dictionary, next_pointer: void*) -> int
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)