|
Monado OpenXR Runtime
|
A basic implementation of the xrt_instance_android interface, a platform-specific "aspect" of xrt_instance. More...
#include <android/android_instance_base.h>

Public Member Functions | |
| xrt_result_t | android_instance_base_init (struct android_instance_base *aib, struct xrt_instance *xinst, const struct xrt_instance_info *ii) |
Initialize resources owned by android_instance_base and sets the xrt_instance::android_instance pointer. More... | |
| void | android_instance_base_cleanup (struct android_instance_base *aib, struct xrt_instance *xinst) |
| Release resources owned by android_instance_base and unsets the aspect pointer. More... | |
Data Fields | |
| struct xrt_instance_android | base |
| struct _JavaVM * | vm |
| void * | context |
| struct android_lifecycle_callbacks * | lifecycle_callbacks |
A basic implementation of the xrt_instance_android interface, a platform-specific "aspect" of xrt_instance.
Store nested in your xrt_instance implementation (by value, not separately allocated), and call android_instance_base_init in your instance creation and android_instance_base_cleanup in instance destruction.
| void android_instance_base_cleanup | ( | struct android_instance_base * | aib, |
| struct xrt_instance * | xinst | ||
| ) |
Release resources owned by android_instance_base and unsets the aspect pointer.
aib itself, since it is intended to be held by value.| aib | The object to de-initialize. |
| xinst | The xrt_instance to update. |
References xrt_instance::android_instance, and android_lifecycle_callbacks::android_lifecycle_callbacks_destroy().
| xrt_result_t android_instance_base_init | ( | struct android_instance_base * | aib, |
| struct xrt_instance * | xinst, | ||
| const struct xrt_instance_info * | ii | ||
| ) |
Initialize resources owned by android_instance_base and sets the xrt_instance::android_instance pointer.
| aib | The object to initialize. |
| xinst | The xrt_instance to update. |
| vm | The JavaVM pointer. |
| activity | The activity jobject, cast to a void pointer. |