OpenXRFutureResult
Inherits: RefCounted < Object
Description
Section titled “Description”Result object tracking the asynchronous result of an OpenXR Future object.
Result object tracking the asynchronous result of an OpenXR Future object, you can use this object to track the result status.
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | cancel_future() |
| int | get_future() const |
| Variant | get_result_value() const |
| ResultStatus | get_status() const |
| void | set_result_value(result_value: Variant) |
Signals
Section titled “Signals”completed
completed(result: OpenXRFutureResult)
Emitted when the asynchronous function is finished or has been cancelled.
Enumerations
Section titled “Enumerations”ResultStatus
enum ResultStatus
RESULT_RUNNING = 0
The asynchronous function is running.
RESULT_FINISHED = 1
The asynchronous function has finished.
RESULT_CANCELLED = 2
The asynchronous function has been cancelled.
Method descriptions
Section titled “Method descriptions”cancel_future
void cancel_future()
Cancel this future, this will interrupt and stop the asynchronous function.
get_future
int get_future() const
Return the XrFutureEXT value this result relates to.
get_result_value
Variant get_result_value() const
Returns the result value of our asynchronous function (if set by the extension). The type of this result value depends on the function being called. Consult the documentation of the relevant function.
get_status
ResultStatus get_status() const
Returns the status of this result.
set_result_value
void set_result_value(result_value: Variant)
Stores the result value we expose to the user.
Note: This method should only be called by an OpenXR extension that implements an asynchronous function.
