org.lwjgl.openxr.XR10 Maven / Gradle / Ivy
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.openxr;
import org.jspecify.annotations.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/** The core OpenXR 1.0 functionality. */
public class XR10 {
/**
* XrResult - Result codes
*
* Description
*
* All return codes in the API are reported via {@code XrResult} return values.
*
* The following are common suffixes shared across many of the return codes:
*
*
* - {@code _INVALID}: The specified handle, atom, or value is formatted incorrectly, or the specified handle was never created or has been destroyed.
* - {@code _UNSUPPORTED}: The specified handle, atom, enumerant, or value is formatted correctly but cannot be used for the lifetime of this function’s parent handle.
* - {@code _UNAVAILABLE}: The specified handle, atom, enumerant, or value is supported by the handle taken by this function, but is not usable at this moment.
*
*
* Success Codes
*
*
* Enum Description
*
* {@link #XR_SUCCESS SUCCESS} Function successfully completed.
* {@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED} The specified timeout time occurred before the operation could complete.
* {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING} The session will be lost soon.
* {@link #XR_EVENT_UNAVAILABLE EVENT_UNAVAILABLE} No event was available.
* {@link #XR_SPACE_BOUNDS_UNAVAILABLE SPACE_BOUNDS_UNAVAILABLE} The space’s bounds are not known at the moment.
* {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED} The session is not in the focused state.
* {@link #XR_FRAME_DISCARDED FRAME_DISCARDED} A frame has been discarded from composition.
* {@link FBRenderModel#XR_RENDER_MODEL_UNAVAILABLE_FB RENDER_MODEL_UNAVAILABLE_FB} The model is unavailable. (Added by the {@link FBRenderModel XR_FB_render_model} extension)
* {@link MSFTSceneMarker#XR_SCENE_MARKER_DATA_NOT_STRING_MSFT SCENE_MARKER_DATA_NOT_STRING_MSFT} Marker does not encode a string. (Added by the {@link MSFTSceneMarker XR_MSFT_scene_marker} extension)
* {@link METAEnvironmentDepth#XR_ENVIRONMENT_DEPTH_NOT_AVAILABLE_META ENVIRONMENT_DEPTH_NOT_AVAILABLE_META} Warning: The requested depth image is not yet available. (Added by the {@link METAEnvironmentDepth XR_META_environment_depth} extension)
* {@link MLFacialExpression#XR_ERROR_FACIAL_EXPRESSION_PERMISSION_DENIED_ML ERROR_FACIAL_EXPRESSION_PERMISSION_DENIED_ML} Permission to track facial expressions was not granted (Added by the {@link MLFacialExpression XR_ML_facial_expression} extension)
* {@link METAColocationDiscovery#XR_COLOCATION_DISCOVERY_ALREADY_ADVERTISING_META COLOCATION_DISCOVERY_ALREADY_ADVERTISING_META} Colocation advertisement has already been enabled (Added by the {@link METAColocationDiscovery XR_META_colocation_discovery} extension)
* {@link METAColocationDiscovery#XR_COLOCATION_DISCOVERY_ALREADY_DISCOVERING_META COLOCATION_DISCOVERY_ALREADY_DISCOVERING_META} Colocation discovery has already been enabled (Added by the {@link METAColocationDiscovery XR_META_colocation_discovery} extension)
*
*
*
* Error Codes
*
*
* Enum Description
*
* {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE} The function usage was invalid in some way.
* {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE} The runtime failed to handle the function in an unexpected way that is not covered by another error result.
* {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY} A memory allocation has failed.
* {@link #XR_ERROR_API_VERSION_UNSUPPORTED ERROR_API_VERSION_UNSUPPORTED} The runtime does not support the requested API version.
* {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} Initialization of object could not be completed.
* {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED} The requested function was not found or is otherwise unsupported.
* {@link #XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED} The requested feature is not supported.
* {@link #XR_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT} A requested extension is not supported.
* {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED} The runtime supports no more of the requested resource.
* {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT} The supplied size was smaller than required.
* {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID} A supplied object handle was invalid.
* {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST} The {@code XrInstance} was lost or could not be found. It will need to be destroyed and optionally recreated.
* {@link #XR_ERROR_SESSION_RUNNING ERROR_SESSION_RUNNING} The session is already running.
* {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING} The session is not yet running.
* {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST} The {@code XrSession} was lost. It will need to be destroyed and optionally recreated.
* {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID} The provided {@code XrSystemId} was invalid.
* {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID} The provided {@code XrPath} was not valid.
* {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED} The maximum number of supported semantic paths has been reached.
* {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID} The semantic path character format is invalid.
* {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED} The semantic path is unsupported.
* {@link #XR_ERROR_LAYER_INVALID ERROR_LAYER_INVALID} The layer was NULL or otherwise invalid.
* {@link #XR_ERROR_LAYER_LIMIT_EXCEEDED ERROR_LAYER_LIMIT_EXCEEDED} The number of specified layers is greater than the supported number.
* {@link #XR_ERROR_SWAPCHAIN_RECT_INVALID ERROR_SWAPCHAIN_RECT_INVALID} The image rect was negatively sized or otherwise invalid.
* {@link #XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED} The image format is not supported by the runtime or platform.
* {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH} The API used to retrieve an action’s state does not match the action’s type.
* {@link #XR_ERROR_SESSION_NOT_READY ERROR_SESSION_NOT_READY} The session is not in the ready state.
* {@link #XR_ERROR_SESSION_NOT_STOPPING ERROR_SESSION_NOT_STOPPING} The session is not in the stopping state.
* {@link #XR_ERROR_TIME_INVALID ERROR_TIME_INVALID} The provided {@code XrTime} was zero, negative, or out of range.
* {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED} The specified reference space is not supported by the runtime or system.
* {@link #XR_ERROR_FILE_ACCESS_ERROR ERROR_FILE_ACCESS_ERROR} The file could not be accessed.
* {@link #XR_ERROR_FILE_CONTENTS_INVALID ERROR_FILE_CONTENTS_INVALID} The file’s contents were invalid.
* {@link #XR_ERROR_FORM_FACTOR_UNSUPPORTED ERROR_FORM_FACTOR_UNSUPPORTED} The specified form factor is not supported by the current runtime or platform.
* {@link #XR_ERROR_FORM_FACTOR_UNAVAILABLE ERROR_FORM_FACTOR_UNAVAILABLE} The specified form factor is supported, but the device is currently not available, e.g. not plugged in or powered off.
* {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT} A requested API layer is not present or could not be loaded.
* {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} The call was made without having made a previously required call.
* {@link #XR_ERROR_GRAPHICS_DEVICE_INVALID ERROR_GRAPHICS_DEVICE_INVALID} The given graphics device is not in a valid state. The graphics device could be lost or initialized without meeting graphics requirements.
* {@link #XR_ERROR_POSE_INVALID ERROR_POSE_INVALID} The supplied pose was invalid with respect to the requirements.
* {@link #XR_ERROR_INDEX_OUT_OF_RANGE ERROR_INDEX_OUT_OF_RANGE} The supplied index was outside the range of valid indices.
* {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED} The specified view configuration type is not supported by the runtime or platform.
* {@link #XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED} The specified environment blend mode is not supported by the runtime or platform.
* {@link #XR_ERROR_NAME_DUPLICATED ERROR_NAME_DUPLICATED} The name provided was a duplicate of an already-existing resource.
* {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID} The name provided was invalid.
* {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED} A referenced action set is not attached to the session.
* {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED} The session already has attached action sets.
* {@link #XR_ERROR_LOCALIZED_NAME_DUPLICATED ERROR_LOCALIZED_NAME_DUPLICATED} The localized name provided was a duplicate of an already-existing resource.
* {@link #XR_ERROR_LOCALIZED_NAME_INVALID ERROR_LOCALIZED_NAME_INVALID} The localized name provided was invalid.
* {@link #XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING} The {@code xrGetGraphicsRequirements}* call was not made before calling {@code xrCreateSession}.
* {@link #XR_ERROR_RUNTIME_UNAVAILABLE ERROR_RUNTIME_UNAVAILABLE} The loader was unable to find or load a runtime.
* {@link XR11#XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED} One or more of the extensions being enabled has dependency on extensions that are not enabled.
* {@link XR11#XR_ERROR_PERMISSION_INSUFFICIENT ERROR_PERMISSION_INSUFFICIENT} Insufficient permissions. This error is included for use by vendor extensions. The precise definition of {@code XR_ERROR_PERMISSION_INSUFFICIENT} and actions possible by the developer or user to resolve it can vary by platform, extension or function. The developer should refer to the documentation of the function that returned the error code and extension it was defined.
* {@link MSFTSpatialAnchor#XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT} Spatial anchor could not be created at that location. (Added by the {@link MSFTSpatialAnchor XR_MSFT_spatial_anchor} extension)
* {@link MSFTSecondaryViewConfiguration#XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT} The secondary view configuration was not enabled when creating the session. (Added by the {@link MSFTSecondaryViewConfiguration XR_MSFT_secondary_view_configuration} extension)
* {@link MSFTControllerModel#XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT} The controller model key is invalid. (Added by the {@link MSFTControllerModel XR_MSFT_controller_model} extension)
* {@link MSFTCompositionLayerReprojection#XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT} The reprojection mode is not supported. (Added by the {@link MSFTCompositionLayerReprojection XR_MSFT_composition_layer_reprojection} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT} Compute new scene not completed. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT ERROR_SCENE_COMPONENT_ID_INVALID_MSFT} Scene component id invalid. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT} Scene component type mismatch. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT} Scene mesh buffer id invalid. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT} Scene compute feature incompatible. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link MSFTSceneUnderstanding#XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT} Scene compute consistency mismatch. (Added by the {@link MSFTSceneUnderstanding XR_MSFT_scene_understanding} extension)
* {@link FBDisplayRefreshRate#XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB} The display refresh rate is not supported by the platform. (Added by the {@link FBDisplayRefreshRate XR_FB_display_refresh_rate} extension)
* {@link FBColorSpace#XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB ERROR_COLOR_SPACE_UNSUPPORTED_FB} The color space is not supported by the runtime. (Added by the {@link FBColorSpace XR_FB_color_space} extension)
* {@link FBSpatialEntity#XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB} The component type is not supported for this space. (Added by the {@link FBSpatialEntity XR_FB_spatial_entity} extension)
* {@link FBSpatialEntity#XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB ERROR_SPACE_COMPONENT_NOT_ENABLED_FB} The required component is not enabled for this space. (Added by the {@link FBSpatialEntity XR_FB_spatial_entity} extension)
* {@link FBSpatialEntity#XR_ERROR_SPACE_COMPONENT_STATUS_PENDING_FB ERROR_SPACE_COMPONENT_STATUS_PENDING_FB} A request to set the component’s status is currently pending. (Added by the {@link FBSpatialEntity XR_FB_spatial_entity} extension)
* {@link FBSpatialEntity#XR_ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB} The component is already set to the requested value. (Added by the {@link FBSpatialEntity XR_FB_spatial_entity} extension)
* {@link FBPassthrough#XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB} The object state is unexpected for the issued command. (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBPassthrough#XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB} Trying to create an MR feature when one was already created and only one instance is allowed. (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBPassthrough#XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB} Requested functionality requires a feature to be created first. (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBPassthrough#XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB ERROR_NOT_PERMITTED_PASSTHROUGH_FB} Requested functionality is not permitted - application is not allowed to perform the requested operation. (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBPassthrough#XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB} There were insufficient resources available to perform an operation. (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBPassthrough#XR_ERROR_UNKNOWN_PASSTHROUGH_FB ERROR_UNKNOWN_PASSTHROUGH_FB} Unknown Passthrough error (no further details provided). (Added by the {@link FBPassthrough XR_FB_passthrough} extension)
* {@link FBRenderModel#XR_ERROR_RENDER_MODEL_KEY_INVALID_FB ERROR_RENDER_MODEL_KEY_INVALID_FB} The model key is invalid. (Added by the {@link FBRenderModel XR_FB_render_model} extension)
* {@link VARJOMarkerTracking#XR_ERROR_MARKER_NOT_TRACKED_VARJO ERROR_MARKER_NOT_TRACKED_VARJO} Marker tracking is disabled or the specified marker is not currently tracked. (Added by the {@link VARJOMarkerTracking XR_VARJO_marker_tracking} extension)
* {@link VARJOMarkerTracking#XR_ERROR_MARKER_ID_INVALID_VARJO ERROR_MARKER_ID_INVALID_VARJO} The specified marker ID is not valid. (Added by the {@link VARJOMarkerTracking XR_VARJO_marker_tracking} extension)
* {@link MLMarkerUnderstanding#XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML} The com.magicleap.permission.MARKER_TRACKING permission was denied. (Added by the {@link MLMarkerUnderstanding XR_ML_marker_understanding} extension)
* {@link MLMarkerUnderstanding#XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML} The specified marker could not be located spatially. (Added by the {@link MLMarkerUnderstanding XR_ML_marker_understanding} extension)
* {@link MLMarkerUnderstanding#XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML} The marker queried does not contain data of the requested type. (Added by the {@link MLMarkerUnderstanding XR_ML_marker_understanding} extension)
* {@link MLMarkerUnderstanding#XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML} {@code createInfo} contains mutually exclusive parameters, such as setting {@link MLMarkerUnderstanding#XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML} with {@link MLMarkerUnderstanding#XR_MARKER_TYPE_ARUCO_ML MARKER_TYPE_ARUCO_ML}. (Added by the {@link MLMarkerUnderstanding XR_ML_marker_understanding} extension)
* {@link MLMarkerUnderstanding#XR_ERROR_MARKER_INVALID_ML ERROR_MARKER_INVALID_ML} The marker id passed to the function was invalid. (Added by the {@link MLMarkerUnderstanding XR_ML_marker_understanding} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML} The localization map being imported is not compatible with current OS or mode. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML} The localization map requested is not available. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_FAIL_ML ERROR_LOCALIZATION_MAP_FAIL_ML} The map localization service failed to fulfill the request, retry later. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML} The com.magicleap.permission.SPACE_IMPORT_EXPORT permission was denied. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML} The com.magicleap.permission.SPACE_MANAGER permission was denied. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML} The map being imported already exists in the system. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLLocalizationMap#XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML} The map localization service cannot export cloud based maps. (Added by the {@link MLLocalizationMap XR_ML_localization_map} extension)
* {@link MLSpatialAnchors#XR_ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML} The com.magicleap.permission.SPATIAL_ANCHOR permission was not granted. (Added by the {@link MLSpatialAnchors XR_ML_spatial_anchors} extension)
* {@link MLSpatialAnchors#XR_ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML} Operation failed because the system is not localized into a localization map. (Added by the {@link MLSpatialAnchors XR_ML_spatial_anchors} extension)
* {@link MLSpatialAnchors#XR_ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML} Operation failed because it is performed outside of the localization map. (Added by the {@link MLSpatialAnchors XR_ML_spatial_anchors} extension)
* {@link MLSpatialAnchors#XR_ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML} Operation failed because the space referenced cannot be located. (Added by the {@link MLSpatialAnchors XR_ML_spatial_anchors} extension)
* {@link MLSpatialAnchorsStorage#XR_ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML} The anchor references was not found. (Added by the {@link MLSpatialAnchorsStorage XR_ML_spatial_anchors_storage} extension)
* {@link MSFTSpatialAnchorPersistence#XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT} A spatial anchor was not found associated with the spatial anchor name provided (Added by the {@link MSFTSpatialAnchorPersistence XR_MSFT_spatial_anchor_persistence} extension)
* {@link MSFTSpatialAnchorPersistence#XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT} The spatial anchor name provided was not valid (Added by the {@link MSFTSpatialAnchorPersistence XR_MSFT_spatial_anchor_persistence} extension)
* {@link FBSpatialEntitySharing#XR_ERROR_SPACE_MAPPING_INSUFFICIENT_FB ERROR_SPACE_MAPPING_INSUFFICIENT_FB} Anchor import from cloud or export from device failed. (Added by the {@link FBSpatialEntitySharing XR_FB_spatial_entity_sharing} extension)
* {@link FBSpatialEntitySharing#XR_ERROR_SPACE_LOCALIZATION_FAILED_FB ERROR_SPACE_LOCALIZATION_FAILED_FB} Anchors were downloaded from the cloud but failed to be imported/aligned on the device. (Added by the {@link FBSpatialEntitySharing XR_FB_spatial_entity_sharing} extension)
* {@link FBSpatialEntitySharing#XR_ERROR_SPACE_NETWORK_TIMEOUT_FB ERROR_SPACE_NETWORK_TIMEOUT_FB} Timeout occurred while waiting for network request to complete. (Added by the {@link FBSpatialEntitySharing XR_FB_spatial_entity_sharing} extension)
* {@link FBSpatialEntitySharing#XR_ERROR_SPACE_NETWORK_REQUEST_FAILED_FB ERROR_SPACE_NETWORK_REQUEST_FAILED_FB} The network request failed. (Added by the {@link FBSpatialEntitySharing XR_FB_spatial_entity_sharing} extension)
* {@link FBSpatialEntitySharing#XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB} Cloud storage is required for this operation but is currently disabled. (Added by the {@link FBSpatialEntitySharing XR_FB_spatial_entity_sharing} extension)
* {@link METAPassthroughColorLut#XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META} The provided data buffer did not match the required size. (Added by the {@link METAPassthroughColorLut XR_META_passthrough_color_lut} extension)
* {@link QCOMTrackingOptimizationSettings#XR_ERROR_HINT_ALREADY_SET_QCOM ERROR_HINT_ALREADY_SET_QCOM} Tracking optimization hint is already set for the domain. (Added by the {@link QCOMTrackingOptimizationSettings XR_QCOM_tracking_optimization_settings} extension)
* {@link HTCAnchor#XR_ERROR_NOT_AN_ANCHOR_HTC ERROR_NOT_AN_ANCHOR_HTC} The provided space is valid but not an anchor. (Added by the {@link HTCAnchor XR_HTC_anchor} extension)
* {@link EXTPlaneDetection#XR_ERROR_SPACE_NOT_LOCATABLE_EXT ERROR_SPACE_NOT_LOCATABLE_EXT} The space passed to the function was not locatable. (Added by the {@link EXTPlaneDetection XR_EXT_plane_detection} extension)
* {@link EXTPlaneDetection#XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT} The permission for this resource was not granted. (Added by the {@link EXTPlaneDetection XR_EXT_plane_detection} extension)
* {@link EXTFuture#XR_ERROR_FUTURE_PENDING_EXT ERROR_FUTURE_PENDING_EXT} Returned by completion function to indicate future is not ready. (Added by the {@link EXTFuture XR_EXT_future} extension)
* {@link EXTFuture#XR_ERROR_FUTURE_INVALID_EXT ERROR_FUTURE_INVALID_EXT} Returned by completion function to indicate future is not valid. (Added by the {@link EXTFuture XR_EXT_future} extension)
* {@link MLSystemNotifications#XR_ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML} The com.magicleap.permission.SYSTEM_NOTIFICATION permission was not granted. (Added by the {@link MLSystemNotifications XR_ML_system_notifications} extension)
* {@link MLSystemNotifications#XR_ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML} Incompatible SKU detected. (Added by the {@link MLSystemNotifications XR_ML_system_notifications} extension)
* {@link MLWorldMeshDetection#XR_ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML} The world mesh detector permission was not granted. (Added by the {@link MLWorldMeshDetection XR_ML_world_mesh_detection} extension)
* {@link MLWorldMeshDetection#XR_ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML} At the time of the call the runtime was unable to locate the space and cannot fulfill your request. (Added by the {@link MLWorldMeshDetection XR_ML_world_mesh_detection} extension)
* {@link METAColocationDiscovery#XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META} The network request failed. (Added by the {@link METAColocationDiscovery XR_META_colocation_discovery} extension)
* {@link METAColocationDiscovery#XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META} The runtime does not have any methods available to perform discovery. (Added by the {@link METAColocationDiscovery XR_META_colocation_discovery} extension)
* {@link METASpatialEntityGroupSharing#XR_ERROR_SPACE_GROUP_NOT_FOUND_META ERROR_SPACE_GROUP_NOT_FOUND_META} The group UUID was not be found within the runtime (Added by the {@link METASpatialEntityGroupSharing XR_META_spatial_entity_group_sharing} extension)
* {@link KHRMaintenance1#XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED_KHR ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED_KHR} Alias for {@link XR11#XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED} (Added by the {@link KHRMaintenance1 XR_KHR_maintenance1} extension)
* {@link KHRMaintenance1#XR_ERROR_PERMISSION_INSUFFICIENT_KHR ERROR_PERMISSION_INSUFFICIENT_KHR} Alias for {@link XR11#XR_ERROR_PERMISSION_INSUFFICIENT ERROR_PERMISSION_INSUFFICIENT} (Added by the {@link KHRMaintenance1 XR_KHR_maintenance1} extension)
*
*
*
* See Also
*
* {@link XrCreateSpatialAnchorsCompletionML}, {@link XrEventDataColocationAdvertisementCompleteMETA}, {@link XrEventDataColocationDiscoveryCompleteMETA}, {@link XrEventDataSceneCaptureCompleteFB}, {@link XrEventDataShareSpacesCompleteMETA}, {@link XrEventDataSpaceEraseCompleteFB}, {@link XrEventDataSpaceListSaveCompleteFB}, {@link XrEventDataSpaceQueryCompleteFB}, {@link XrEventDataSpaceSaveCompleteFB}, {@link XrEventDataSpaceSetStatusCompleteFB}, {@link XrEventDataSpaceShareCompleteFB}, {@link XrEventDataSpatialAnchorCreateCompleteFB}, {@link XrEventDataStartColocationAdvertisementCompleteMETA}, {@link XrEventDataStartColocationDiscoveryCompleteMETA}, {@link XrEventDataStopColocationAdvertisementCompleteMETA}, {@link XrEventDataStopColocationDiscoveryCompleteMETA}, {@link XrFutureCompletionBaseHeaderEXT}, {@link XrFutureCompletionEXT}, {@link XrSpatialAnchorCompletionResultML}, {@link XrSpatialAnchorsDeleteCompletionML}, {@link XrSpatialAnchorsPublishCompletionML}, {@link XrSpatialAnchorsQueryCompletionML}, {@link XrSpatialAnchorsUpdateExpirationCompletionML}, {@link XrWorldMeshRequestCompletionML}, {@link XrWorldMeshStateRequestCompletionML}, {@link #xrResultToString ResultToString}
*/
public static final int
XR_SUCCESS = 0,
XR_TIMEOUT_EXPIRED = 1,
XR_SESSION_LOSS_PENDING = 3,
XR_EVENT_UNAVAILABLE = 4,
XR_SPACE_BOUNDS_UNAVAILABLE = 7,
XR_SESSION_NOT_FOCUSED = 8,
XR_FRAME_DISCARDED = 9,
XR_ERROR_VALIDATION_FAILURE = -1,
XR_ERROR_RUNTIME_FAILURE = -2,
XR_ERROR_OUT_OF_MEMORY = -3,
XR_ERROR_API_VERSION_UNSUPPORTED = -4,
XR_ERROR_INITIALIZATION_FAILED = -6,
XR_ERROR_FUNCTION_UNSUPPORTED = -7,
XR_ERROR_FEATURE_UNSUPPORTED = -8,
XR_ERROR_EXTENSION_NOT_PRESENT = -9,
XR_ERROR_LIMIT_REACHED = -10,
XR_ERROR_SIZE_INSUFFICIENT = -11,
XR_ERROR_HANDLE_INVALID = -12,
XR_ERROR_INSTANCE_LOST = -13,
XR_ERROR_SESSION_RUNNING = -14,
XR_ERROR_SESSION_NOT_RUNNING = -16,
XR_ERROR_SESSION_LOST = -17,
XR_ERROR_SYSTEM_INVALID = -18,
XR_ERROR_PATH_INVALID = -19,
XR_ERROR_PATH_COUNT_EXCEEDED = -20,
XR_ERROR_PATH_FORMAT_INVALID = -21,
XR_ERROR_PATH_UNSUPPORTED = -22,
XR_ERROR_LAYER_INVALID = -23,
XR_ERROR_LAYER_LIMIT_EXCEEDED = -24,
XR_ERROR_SWAPCHAIN_RECT_INVALID = -25,
XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -26,
XR_ERROR_ACTION_TYPE_MISMATCH = -27,
XR_ERROR_SESSION_NOT_READY = -28,
XR_ERROR_SESSION_NOT_STOPPING = -29,
XR_ERROR_TIME_INVALID = -30,
XR_ERROR_REFERENCE_SPACE_UNSUPPORTED = -31,
XR_ERROR_FILE_ACCESS_ERROR = -32,
XR_ERROR_FILE_CONTENTS_INVALID = -33,
XR_ERROR_FORM_FACTOR_UNSUPPORTED = -34,
XR_ERROR_FORM_FACTOR_UNAVAILABLE = -35,
XR_ERROR_API_LAYER_NOT_PRESENT = -36,
XR_ERROR_CALL_ORDER_INVALID = -37,
XR_ERROR_GRAPHICS_DEVICE_INVALID = -38,
XR_ERROR_POSE_INVALID = -39,
XR_ERROR_INDEX_OUT_OF_RANGE = -40,
XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED = -41,
XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED = -42,
XR_ERROR_NAME_DUPLICATED = -44,
XR_ERROR_NAME_INVALID = -45,
XR_ERROR_ACTIONSET_NOT_ATTACHED = -46,
XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47,
XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48,
XR_ERROR_LOCALIZED_NAME_INVALID = -49,
XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING = -50,
XR_ERROR_RUNTIME_UNAVAILABLE = -51;
/**
* XrStructureType - Values for type members of structs
*
* Description
*
* Most structures containing {@code type} members have a value of {@code type} matching the type of the structure, as described more fully in Valid Usage for Structure Types.
*
* Note that all extension enums begin at the extension enum base of 10^9
(base 10). Each extension is assigned a block of 1000 enums, starting at the enum base and arranged by the extension’s number.
*
* See Also
*
* {@link XrActionCreateInfo}, {@link XrActionSetCreateInfo}, {@link XrActionSpaceCreateInfo}, {@link XrActionStateBoolean}, {@link XrActionStateFloat}, {@link XrActionStateGetInfo}, {@link XrActionStatePose}, {@link XrActionStateVector2f}, {@link XrActionsSyncInfo}, {@link XrActiveActionSetPrioritiesEXT}, {@link XrApiLayerProperties}, {@link XrBaseInStructure}, {@link XrBaseOutStructure}, {@link XrBindingModificationBaseHeaderKHR}, {@link XrBindingModificationsKHR}, {@link XrBodyJointLocationsFB}, {@link XrBodyJointLocationsHTC}, {@link XrBodyJointsLocateInfoFB}, {@link XrBodyJointsLocateInfoHTC}, {@link XrBodySkeletonFB}, {@link XrBodySkeletonHTC}, {@link XrBodyTrackerCreateInfoFB}, {@link XrBodyTrackerCreateInfoHTC}, {@link XrBoundSourcesForActionEnumerateInfo}, {@link XrBoundary2DFB}, {@link XrColocationAdvertisementStartInfoMETA}, {@link XrColocationAdvertisementStopInfoMETA}, {@link XrColocationDiscoveryStartInfoMETA}, {@link XrColocationDiscoveryStopInfoMETA}, {@link XrCompositionLayerAlphaBlendFB}, {@link XrCompositionLayerBaseHeader}, {@link XrCompositionLayerColorScaleBiasKHR}, {@link XrCompositionLayerCubeKHR}, {@link XrCompositionLayerCylinderKHR}, {@link XrCompositionLayerDepthInfoKHR}, {@link XrCompositionLayerDepthTestFB}, {@link XrCompositionLayerDepthTestVARJO}, {@link XrCompositionLayerEquirect2KHR}, {@link XrCompositionLayerEquirectKHR}, {@link XrCompositionLayerImageLayoutFB}, {@link XrCompositionLayerPassthroughFB}, {@link XrCompositionLayerPassthroughHTC}, {@link XrCompositionLayerProjection}, {@link XrCompositionLayerProjectionView}, {@link XrCompositionLayerQuad}, {@link XrCompositionLayerReprojectionInfoMSFT}, {@link XrCompositionLayerReprojectionPlaneOverrideMSFT}, {@link XrCompositionLayerSecureContentFB}, {@link XrCompositionLayerSettingsFB}, {@link XrCompositionLayerSpaceWarpInfoFB}, {@link XrControllerModelKeyStateMSFT}, {@link XrControllerModelNodePropertiesMSFT}, {@link XrControllerModelNodeStateMSFT}, {@link XrControllerModelPropertiesMSFT}, {@link XrControllerModelStateMSFT}, {@link XrCoordinateSpaceCreateInfoML}, {@link XrCreateSpatialAnchorsCompletionML}, {@link XrDebugUtilsLabelEXT}, {@link XrDebugUtilsMessengerCallbackDataEXT}, {@link XrDebugUtilsMessengerCreateInfoEXT}, {@link XrDebugUtilsObjectNameInfoEXT}, {@link XrDevicePcmSampleRateStateFB}, {@link XrDigitalLensControlALMALENCE}, {@link XrEnvironmentDepthHandRemovalSetInfoMETA}, {@link XrEnvironmentDepthImageAcquireInfoMETA}, {@link XrEnvironmentDepthImageMETA}, {@link XrEnvironmentDepthImageViewMETA}, {@link XrEnvironmentDepthProviderCreateInfoMETA}, {@link XrEnvironmentDepthSwapchainCreateInfoMETA}, {@link XrEnvironmentDepthSwapchainStateMETA}, {@link XrEventDataBaseHeader}, {@link XrEventDataBuffer}, {@link XrEventDataColocationAdvertisementCompleteMETA}, {@link XrEventDataColocationDiscoveryCompleteMETA}, {@link XrEventDataColocationDiscoveryResultMETA}, {@link XrEventDataDisplayRefreshRateChangedFB}, {@link XrEventDataEventsLost}, {@link XrEventDataEyeCalibrationChangedML}, {@link XrEventDataHeadsetFitChangedML}, {@link XrEventDataInstanceLossPending}, {@link XrEventDataInteractionProfileChanged}, {@link XrEventDataLocalizationChangedML}, {@link XrEventDataMainSessionVisibilityChangedEXTX}, {@link XrEventDataMarkerTrackingUpdateVARJO}, {@link XrEventDataPassthroughLayerResumedMETA}, {@link XrEventDataPassthroughStateChangedFB}, {@link XrEventDataPerfSettingsEXT}, {@link XrEventDataReferenceSpaceChangePending}, {@link XrEventDataSceneCaptureCompleteFB}, {@link XrEventDataSessionStateChanged}, {@link XrEventDataShareSpacesCompleteMETA}, {@link XrEventDataSpaceEraseCompleteFB}, {@link XrEventDataSpaceListSaveCompleteFB}, {@link XrEventDataSpaceQueryCompleteFB}, {@link XrEventDataSpaceQueryResultsAvailableFB}, {@link XrEventDataSpaceSaveCompleteFB}, {@link XrEventDataSpaceSetStatusCompleteFB}, {@link XrEventDataSpaceShareCompleteFB}, {@link XrEventDataSpatialAnchorCreateCompleteFB}, {@link XrEventDataStartColocationAdvertisementCompleteMETA}, {@link XrEventDataStartColocationDiscoveryCompleteMETA}, {@link XrEventDataStopColocationAdvertisementCompleteMETA}, {@link XrEventDataStopColocationDiscoveryCompleteMETA}, {@link XrEventDataUserPresenceChangedEXT}, {@link XrEventDataVirtualKeyboardBackspaceMETA}, {@link XrEventDataVirtualKeyboardCommitTextMETA}, {@link XrEventDataVirtualKeyboardEnterMETA}, {@link XrEventDataVirtualKeyboardHiddenMETA}, {@link XrEventDataVirtualKeyboardShownMETA}, {@link XrEventDataVisibilityMaskChangedKHR}, {@link XrEventDataViveTrackerConnectedHTCX}, {@link XrExtensionProperties}, {@link XrExternalCameraOCULUS}, {@link XrEyeGazeSampleTimeEXT}, {@link XrEyeGazesFB}, {@link XrEyeGazesInfoFB}, {@link XrEyeTrackerCreateInfoFB}, {@link XrFaceExpressionInfo2FB}, {@link XrFaceExpressionInfoFB}, {@link XrFaceExpressionWeights2FB}, {@link XrFaceExpressionWeightsFB}, {@link XrFaceTrackerCreateInfo2FB}, {@link XrFaceTrackerCreateInfoFB}, {@link XrFacialExpressionBlendShapeGetInfoML}, {@link XrFacialExpressionBlendShapePropertiesML}, {@link XrFacialExpressionClientCreateInfoML}, {@link XrFacialExpressionsHTC}, {@link XrFacialTrackerCreateInfoHTC}, {@link XrForceFeedbackCurlApplyLocationsMNDX}, {@link XrFoveatedViewConfigurationViewVARJO}, {@link XrFoveationApplyInfoHTC}, {@link XrFoveationCustomModeInfoHTC}, {@link XrFoveationDynamicModeInfoHTC}, {@link XrFoveationEyeTrackedProfileCreateInfoMETA}, {@link XrFoveationEyeTrackedStateMETA}, {@link XrFoveationLevelProfileCreateInfoFB}, {@link XrFoveationProfileCreateInfoFB}, {@link XrFrameBeginInfo}, {@link XrFrameEndInfo}, {@link XrFrameEndInfoML}, {@link XrFrameState}, {@link XrFrameWaitInfo}, {@link XrFutureCancelInfoEXT}, {@link XrFutureCompletionBaseHeaderEXT}, {@link XrFutureCompletionEXT}, {@link XrFuturePollInfoEXT}, {@link XrFuturePollResultEXT}, {@link XrGeometryInstanceCreateInfoFB}, {@link XrGeometryInstanceTransformFB}, {@link XrGlobalDimmerFrameEndInfoML}, {@link XrGraphicsBindingEGLMNDX}, {@link XrGraphicsBindingOpenGLWaylandKHR}, {@link XrGraphicsBindingOpenGLWin32KHR}, {@link XrGraphicsBindingOpenGLXcbKHR}, {@link XrGraphicsBindingOpenGLXlibKHR}, {@link XrGraphicsBindingVulkanKHR}, {@link XrGraphicsRequirementsOpenGLKHR}, {@link XrGraphicsRequirementsVulkanKHR}, {@link XrHandJointLocationsEXT}, {@link XrHandJointVelocitiesEXT}, {@link XrHandJointsLocateInfoEXT}, {@link XrHandJointsMotionRangeInfoEXT}, {@link XrHandMeshMSFT}, {@link XrHandMeshSpaceCreateInfoMSFT}, {@link XrHandMeshUpdateInfoMSFT}, {@link XrHandPoseTypeInfoMSFT}, {@link XrHandTrackerCreateInfoEXT}, {@link XrHandTrackingAimStateFB}, {@link XrHandTrackingCapsulesStateFB}, {@link XrHandTrackingDataSourceInfoEXT}, {@link XrHandTrackingDataSourceStateEXT}, {@link XrHandTrackingMeshFB}, {@link XrHandTrackingScaleFB}, {@link XrHapticActionInfo}, {@link XrHapticAmplitudeEnvelopeVibrationFB}, {@link XrHapticBaseHeader}, {@link XrHapticPcmVibrationFB}, {@link XrHapticVibration}, {@link XrHolographicWindowAttachmentMSFT}, {@link XrInputSourceLocalizedNameGetInfo}, {@link XrInstanceCreateInfo}, {@link XrInstanceProperties}, {@link XrInteractionProfileAnalogThresholdVALVE}, {@link XrInteractionProfileDpadBindingEXT}, {@link XrInteractionProfileState}, {@link XrInteractionProfileSuggestedBinding}, {@link XrKeyboardSpaceCreateInfoFB}, {@link XrKeyboardTrackingQueryFB}, {@link XrLoaderInitInfoBaseHeaderKHR}, {@link XrLocalDimmingFrameEndInfoMETA}, {@link XrLocalizationEnableEventsInfoML}, {@link XrLocalizationMapImportInfoML}, {@link XrLocalizationMapML}, {@link XrLocalizationMapQueryInfoBaseHeaderML}, {@link XrMapLocalizationRequestInfoML}, {@link XrMarkerDetectorAprilTagInfoML}, {@link XrMarkerDetectorArucoInfoML}, {@link XrMarkerDetectorCreateInfoML}, {@link XrMarkerDetectorCustomProfileInfoML}, {@link XrMarkerDetectorSizeInfoML}, {@link XrMarkerDetectorSnapshotInfoML}, {@link XrMarkerDetectorStateML}, {@link XrMarkerSpaceCreateInfoML}, {@link XrMarkerSpaceCreateInfoVARJO}, {@link XrNewSceneComputeInfoMSFT}, {@link XrPassthroughBrightnessContrastSaturationFB}, {@link XrPassthroughColorHTC}, {@link XrPassthroughColorLutCreateInfoMETA}, {@link XrPassthroughColorLutUpdateInfoMETA}, {@link XrPassthroughColorMapInterpolatedLutMETA}, {@link XrPassthroughColorMapLutMETA}, {@link XrPassthroughColorMapMonoToMonoFB}, {@link XrPassthroughColorMapMonoToRgbaFB}, {@link XrPassthroughCreateInfoFB}, {@link XrPassthroughCreateInfoHTC}, {@link XrPassthroughKeyboardHandsIntensityFB}, {@link XrPassthroughLayerCreateInfoFB}, {@link XrPassthroughMeshTransformInfoHTC}, {@link XrPassthroughPreferencesMETA}, {@link XrPassthroughStyleFB}, {@link XrPerformanceMetricsCounterMETA}, {@link XrPerformanceMetricsStateMETA}, {@link XrPlaneDetectorBeginInfoEXT}, {@link XrPlaneDetectorCreateInfoEXT}, {@link XrPlaneDetectorGetInfoEXT}, {@link XrPlaneDetectorLocationEXT}, {@link XrPlaneDetectorLocationsEXT}, {@link XrPlaneDetectorPolygonBufferEXT}, {@link XrRecommendedLayerResolutionGetInfoMETA}, {@link XrRecommendedLayerResolutionMETA}, {@link XrReferenceSpaceCreateInfo}, {@link XrRenderModelBufferFB}, {@link XrRenderModelCapabilitiesRequestFB}, {@link XrRenderModelLoadInfoFB}, {@link XrRenderModelPathInfoFB}, {@link XrRenderModelPropertiesFB}, {@link XrRoomLayoutFB}, {@link XrSceneCaptureRequestInfoFB}, {@link XrSceneComponentLocationsMSFT}, {@link XrSceneComponentParentFilterInfoMSFT}, {@link XrSceneComponentsGetInfoMSFT}, {@link XrSceneComponentsLocateInfoMSFT}, {@link XrSceneComponentsMSFT}, {@link XrSceneCreateInfoMSFT}, {@link XrSceneDeserializeInfoMSFT}, {@link XrSceneMarkerQRCodesMSFT}, {@link XrSceneMarkerTypeFilterMSFT}, {@link XrSceneMarkersMSFT}, {@link XrSceneMeshBuffersGetInfoMSFT}, {@link XrSceneMeshBuffersMSFT}, {@link XrSceneMeshIndicesUint16MSFT}, {@link XrSceneMeshIndicesUint32MSFT}, {@link XrSceneMeshVertexBufferMSFT}, {@link XrSceneMeshesMSFT}, {@link XrSceneObjectTypesFilterInfoMSFT}, {@link XrSceneObjectsMSFT}, {@link XrSceneObserverCreateInfoMSFT}, {@link XrScenePlaneAlignmentFilterInfoMSFT}, {@link XrScenePlanesMSFT}, {@link XrSecondaryViewConfigurationFrameEndInfoMSFT}, {@link XrSecondaryViewConfigurationFrameStateMSFT}, {@link XrSecondaryViewConfigurationLayerInfoMSFT}, {@link XrSecondaryViewConfigurationSessionBeginInfoMSFT}, {@link XrSecondaryViewConfigurationStateMSFT}, {@link XrSecondaryViewConfigurationSwapchainCreateInfoMSFT}, {@link XrSemanticLabelsFB}, {@link XrSemanticLabelsSupportInfoFB}, {@link XrSerializedSceneFragmentDataGetInfoMSFT}, {@link XrSessionActionSetsAttachInfo}, {@link XrSessionBeginInfo}, {@link XrSessionCreateInfo}, {@link XrSessionCreateInfoOverlayEXTX}, {@link XrShareSpacesInfoMETA}, {@link XrShareSpacesRecipientBaseHeaderMETA}, {@link XrShareSpacesRecipientGroupsMETA}, {@link XrSpaceComponentFilterInfoFB}, {@link XrSpaceComponentStatusFB}, {@link XrSpaceComponentStatusSetInfoFB}, {@link XrSpaceContainerFB}, {@link XrSpaceEraseInfoFB}, {@link XrSpaceFilterInfoBaseHeaderFB}, {@link XrSpaceGroupUuidFilterInfoMETA}, {@link XrSpaceListSaveInfoFB}, {@link XrSpaceLocation}, {@link XrSpaceLocations}, {@link XrSpaceQueryInfoBaseHeaderFB}, {@link XrSpaceQueryInfoFB}, {@link XrSpaceQueryResultsFB}, {@link XrSpaceSaveInfoFB}, {@link XrSpaceShareInfoFB}, {@link XrSpaceStorageLocationFilterInfoFB}, {@link XrSpaceTriangleMeshGetInfoMETA}, {@link XrSpaceTriangleMeshMETA}, {@link XrSpaceUserCreateInfoFB}, {@link XrSpaceUuidFilterInfoFB}, {@link XrSpaceVelocities}, {@link XrSpaceVelocity}, {@link XrSpacesLocateInfo}, {@link XrSpatialAnchorCreateInfoFB}, {@link XrSpatialAnchorCreateInfoHTC}, {@link XrSpatialAnchorCreateInfoMSFT}, {@link XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT}, {@link XrSpatialAnchorPersistenceInfoMSFT}, {@link XrSpatialAnchorSpaceCreateInfoMSFT}, {@link XrSpatialAnchorStateML}, {@link XrSpatialAnchorsCreateInfoBaseHeaderML}, {@link XrSpatialAnchorsCreateInfoFromPoseML}, {@link XrSpatialAnchorsCreateInfoFromUuidsML}, {@link XrSpatialAnchorsCreateStorageInfoML}, {@link XrSpatialAnchorsDeleteCompletionDetailsML}, {@link XrSpatialAnchorsDeleteCompletionML}, {@link XrSpatialAnchorsDeleteInfoML}, {@link XrSpatialAnchorsPublishCompletionDetailsML}, {@link XrSpatialAnchorsPublishCompletionML}, {@link XrSpatialAnchorsPublishInfoML}, {@link XrSpatialAnchorsQueryCompletionML}, {@link XrSpatialAnchorsQueryInfoBaseHeaderML}, {@link XrSpatialAnchorsQueryInfoRadiusML}, {@link XrSpatialAnchorsUpdateExpirationCompletionDetailsML}, {@link XrSpatialAnchorsUpdateExpirationCompletionML}, {@link XrSpatialAnchorsUpdateExpirationInfoML}, {@link XrSpatialGraphNodeBindingPropertiesGetInfoMSFT}, {@link XrSpatialGraphNodeBindingPropertiesMSFT}, {@link XrSpatialGraphNodeSpaceCreateInfoMSFT}, {@link XrSpatialGraphStaticNodeBindingCreateInfoMSFT}, {@link XrSwapchainCreateInfo}, {@link XrSwapchainCreateInfoFoveationFB}, {@link XrSwapchainImageAcquireInfo}, {@link XrSwapchainImageBaseHeader}, {@link XrSwapchainImageFoveationVulkanFB}, {@link XrSwapchainImageOpenGLKHR}, {@link XrSwapchainImageReleaseInfo}, {@link XrSwapchainImageVulkanKHR}, {@link XrSwapchainImageWaitInfo}, {@link XrSwapchainStateBaseHeaderFB}, {@link XrSwapchainStateFoveationFB}, {@link XrSwapchainStateSamplerOpenGLESFB}, {@link XrSwapchainStateSamplerVulkanFB}, {@link XrSystemAnchorPropertiesHTC}, {@link XrSystemBodyTrackingPropertiesFB}, {@link XrSystemBodyTrackingPropertiesHTC}, {@link XrSystemColocationDiscoveryPropertiesMETA}, {@link XrSystemColorSpacePropertiesFB}, {@link XrSystemEnvironmentDepthPropertiesMETA}, {@link XrSystemEyeGazeInteractionPropertiesEXT}, {@link XrSystemEyeTrackingPropertiesFB}, {@link XrSystemFaceTrackingProperties2FB}, {@link XrSystemFaceTrackingPropertiesFB}, {@link XrSystemFacialExpressionPropertiesML}, {@link XrSystemFacialTrackingPropertiesHTC}, {@link XrSystemForceFeedbackCurlPropertiesMNDX}, {@link XrSystemFoveatedRenderingPropertiesVARJO}, {@link XrSystemFoveationEyeTrackedPropertiesMETA}, {@link XrSystemGetInfo}, {@link XrSystemHandTrackingMeshPropertiesMSFT}, {@link XrSystemHandTrackingPropertiesEXT}, {@link XrSystemHeadsetIdPropertiesMETA}, {@link XrSystemKeyboardTrackingPropertiesFB}, {@link XrSystemMarkerTrackingPropertiesVARJO}, {@link XrSystemMarkerUnderstandingPropertiesML}, {@link XrSystemNotificationsSetInfoML}, {@link XrSystemPassthroughColorLutPropertiesMETA}, {@link XrSystemPassthroughProperties2FB}, {@link XrSystemPassthroughPropertiesFB}, {@link XrSystemPlaneDetectionPropertiesEXT}, {@link XrSystemProperties}, {@link XrSystemRenderModelPropertiesFB}, {@link XrSystemSpaceWarpPropertiesFB}, {@link XrSystemSpatialEntityGroupSharingPropertiesMETA}, {@link XrSystemSpatialEntityPropertiesFB}, {@link XrSystemSpatialEntitySharingPropertiesMETA}, {@link XrSystemUserPresencePropertiesEXT}, {@link XrSystemVirtualKeyboardPropertiesMETA}, {@link XrTriangleMeshCreateInfoFB}, {@link XrUserCalibrationEnableEventsInfoML}, {@link XrView}, {@link XrViewConfigurationDepthRangeEXT}, {@link XrViewConfigurationProperties}, {@link XrViewConfigurationView}, {@link XrViewConfigurationViewFovEPIC}, {@link XrViewLocateFoveatedRenderingVARJO}, {@link XrViewLocateInfo}, {@link XrViewState}, {@link XrVirtualKeyboardAnimationStateMETA}, {@link XrVirtualKeyboardCreateInfoMETA}, {@link XrVirtualKeyboardInputInfoMETA}, {@link XrVirtualKeyboardLocationInfoMETA}, {@link XrVirtualKeyboardModelAnimationStatesMETA}, {@link XrVirtualKeyboardModelVisibilitySetInfoMETA}, {@link XrVirtualKeyboardSpaceCreateInfoMETA}, {@link XrVirtualKeyboardTextContextChangeInfoMETA}, {@link XrVirtualKeyboardTextureDataMETA}, {@link XrVisibilityMaskKHR}, {@link XrVisualMeshComputeLodInfoMSFT}, {@link XrViveTrackerPathsHTCX}, {@link XrVulkanDeviceCreateInfoKHR}, {@link XrVulkanGraphicsDeviceGetInfoKHR}, {@link XrVulkanInstanceCreateInfoKHR}, {@link XrVulkanSwapchainCreateInfoMETA}, {@link XrVulkanSwapchainFormatListCreateInfoKHR}, {@link XrWorldMeshBlockML}, {@link XrWorldMeshBlockRequestML}, {@link XrWorldMeshBlockStateML}, {@link XrWorldMeshBufferML}, {@link XrWorldMeshBufferRecommendedSizeInfoML}, {@link XrWorldMeshBufferSizeML}, {@link XrWorldMeshDetectorCreateInfoML}, {@link XrWorldMeshGetInfoML}, {@link XrWorldMeshRequestCompletionInfoML}, {@link XrWorldMeshRequestCompletionML}, {@link XrWorldMeshStateRequestCompletionML}, {@link XrWorldMeshStateRequestInfoML}, {@link #xrStructureTypeToString StructureTypeToString}
*
* Enum values:
*
*
* - {@link #XR_TYPE_UNKNOWN TYPE_UNKNOWN}
* - {@link #XR_TYPE_API_LAYER_PROPERTIES TYPE_API_LAYER_PROPERTIES}
* - {@link #XR_TYPE_EXTENSION_PROPERTIES TYPE_EXTENSION_PROPERTIES}
* - {@link #XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO}
* - {@link #XR_TYPE_SYSTEM_GET_INFO TYPE_SYSTEM_GET_INFO}
* - {@link #XR_TYPE_SYSTEM_PROPERTIES TYPE_SYSTEM_PROPERTIES}
* - {@link #XR_TYPE_VIEW_LOCATE_INFO TYPE_VIEW_LOCATE_INFO}
* - {@link #XR_TYPE_VIEW TYPE_VIEW}
* - {@link #XR_TYPE_SESSION_CREATE_INFO TYPE_SESSION_CREATE_INFO}
* - {@link #XR_TYPE_SWAPCHAIN_CREATE_INFO TYPE_SWAPCHAIN_CREATE_INFO}
* - {@link #XR_TYPE_SESSION_BEGIN_INFO TYPE_SESSION_BEGIN_INFO}
* - {@link #XR_TYPE_VIEW_STATE TYPE_VIEW_STATE}
* - {@link #XR_TYPE_FRAME_END_INFO TYPE_FRAME_END_INFO}
* - {@link #XR_TYPE_HAPTIC_VIBRATION TYPE_HAPTIC_VIBRATION}
* - {@link #XR_TYPE_EVENT_DATA_BUFFER TYPE_EVENT_DATA_BUFFER}
* - {@link #XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING}
* - {@link #XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED TYPE_EVENT_DATA_SESSION_STATE_CHANGED}
* - {@link #XR_TYPE_ACTION_STATE_BOOLEAN TYPE_ACTION_STATE_BOOLEAN}
* - {@link #XR_TYPE_ACTION_STATE_FLOAT TYPE_ACTION_STATE_FLOAT}
* - {@link #XR_TYPE_ACTION_STATE_VECTOR2F TYPE_ACTION_STATE_VECTOR2F}
* - {@link #XR_TYPE_ACTION_STATE_POSE TYPE_ACTION_STATE_POSE}
* - {@link #XR_TYPE_ACTION_SET_CREATE_INFO TYPE_ACTION_SET_CREATE_INFO}
* - {@link #XR_TYPE_ACTION_CREATE_INFO TYPE_ACTION_CREATE_INFO}
* - {@link #XR_TYPE_INSTANCE_PROPERTIES TYPE_INSTANCE_PROPERTIES}
* - {@link #XR_TYPE_FRAME_WAIT_INFO TYPE_FRAME_WAIT_INFO}
* - {@link #XR_TYPE_COMPOSITION_LAYER_PROJECTION TYPE_COMPOSITION_LAYER_PROJECTION}
* - {@link #XR_TYPE_COMPOSITION_LAYER_QUAD TYPE_COMPOSITION_LAYER_QUAD}
* - {@link #XR_TYPE_REFERENCE_SPACE_CREATE_INFO TYPE_REFERENCE_SPACE_CREATE_INFO}
* - {@link #XR_TYPE_ACTION_SPACE_CREATE_INFO TYPE_ACTION_SPACE_CREATE_INFO}
* - {@link #XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING}
* - {@link #XR_TYPE_VIEW_CONFIGURATION_VIEW TYPE_VIEW_CONFIGURATION_VIEW}
* - {@link #XR_TYPE_SPACE_LOCATION TYPE_SPACE_LOCATION}
* - {@link #XR_TYPE_SPACE_VELOCITY TYPE_SPACE_VELOCITY}
* - {@link #XR_TYPE_FRAME_STATE TYPE_FRAME_STATE}
* - {@link #XR_TYPE_VIEW_CONFIGURATION_PROPERTIES TYPE_VIEW_CONFIGURATION_PROPERTIES}
* - {@link #XR_TYPE_FRAME_BEGIN_INFO TYPE_FRAME_BEGIN_INFO}
* - {@link #XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW TYPE_COMPOSITION_LAYER_PROJECTION_VIEW}
* - {@link #XR_TYPE_EVENT_DATA_EVENTS_LOST TYPE_EVENT_DATA_EVENTS_LOST}
* - {@link #XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING}
* - {@link #XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED}
* - {@link #XR_TYPE_INTERACTION_PROFILE_STATE TYPE_INTERACTION_PROFILE_STATE}
* - {@link #XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO}
* - {@link #XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO TYPE_SWAPCHAIN_IMAGE_WAIT_INFO}
* - {@link #XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO}
* - {@link #XR_TYPE_ACTION_STATE_GET_INFO TYPE_ACTION_STATE_GET_INFO}
* - {@link #XR_TYPE_HAPTIC_ACTION_INFO TYPE_HAPTIC_ACTION_INFO}
* - {@link #XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO TYPE_SESSION_ACTION_SETS_ATTACH_INFO}
* - {@link #XR_TYPE_ACTIONS_SYNC_INFO TYPE_ACTIONS_SYNC_INFO}
* - {@link #XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO}
* - {@link #XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO}
*
*/
public static final int
XR_TYPE_UNKNOWN = 0,
XR_TYPE_API_LAYER_PROPERTIES = 1,
XR_TYPE_EXTENSION_PROPERTIES = 2,
XR_TYPE_INSTANCE_CREATE_INFO = 3,
XR_TYPE_SYSTEM_GET_INFO = 4,
XR_TYPE_SYSTEM_PROPERTIES = 5,
XR_TYPE_VIEW_LOCATE_INFO = 6,
XR_TYPE_VIEW = 7,
XR_TYPE_SESSION_CREATE_INFO = 8,
XR_TYPE_SWAPCHAIN_CREATE_INFO = 9,
XR_TYPE_SESSION_BEGIN_INFO = 10,
XR_TYPE_VIEW_STATE = 11,
XR_TYPE_FRAME_END_INFO = 12,
XR_TYPE_HAPTIC_VIBRATION = 13,
XR_TYPE_EVENT_DATA_BUFFER = 16,
XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING = 17,
XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED = 18,
XR_TYPE_ACTION_STATE_BOOLEAN = 23,
XR_TYPE_ACTION_STATE_FLOAT = 24,
XR_TYPE_ACTION_STATE_VECTOR2F = 25,
XR_TYPE_ACTION_STATE_POSE = 27,
XR_TYPE_ACTION_SET_CREATE_INFO = 28,
XR_TYPE_ACTION_CREATE_INFO = 29,
XR_TYPE_INSTANCE_PROPERTIES = 32,
XR_TYPE_FRAME_WAIT_INFO = 33,
XR_TYPE_COMPOSITION_LAYER_PROJECTION = 35,
XR_TYPE_COMPOSITION_LAYER_QUAD = 36,
XR_TYPE_REFERENCE_SPACE_CREATE_INFO = 37,
XR_TYPE_ACTION_SPACE_CREATE_INFO = 38,
XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING = 40,
XR_TYPE_VIEW_CONFIGURATION_VIEW = 41,
XR_TYPE_SPACE_LOCATION = 42,
XR_TYPE_SPACE_VELOCITY = 43,
XR_TYPE_FRAME_STATE = 44,
XR_TYPE_VIEW_CONFIGURATION_PROPERTIES = 45,
XR_TYPE_FRAME_BEGIN_INFO = 46,
XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW = 48,
XR_TYPE_EVENT_DATA_EVENTS_LOST = 49,
XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING = 51,
XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED = 52,
XR_TYPE_INTERACTION_PROFILE_STATE = 53,
XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO = 55,
XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO = 56,
XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO = 57,
XR_TYPE_ACTION_STATE_GET_INFO = 58,
XR_TYPE_HAPTIC_ACTION_INFO = 59,
XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO = 60,
XR_TYPE_ACTIONS_SYNC_INFO = 61,
XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO = 62,
XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO = 63;
/**
* XrFormFactor - Supported form factors
*
* Description
*
* The predefined form factors which may be supported by OpenXR runtimes are:
*
* Enumerant Descriptions
*
*
* - {@link #XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY FORM_FACTOR_HEAD_MOUNTED_DISPLAY}. The tracked display is attached to the user’s head. The user cannot touch the display itself. A VR headset would be an example of this form factor.
* - {@link #XR_FORM_FACTOR_HANDHELD_DISPLAY FORM_FACTOR_HANDHELD_DISPLAY}. The tracked display is held in the user’s hand, independent from the user’s head. The user may be able to touch the display, allowing for screen-space UI. A mobile phone running an AR experience using pass-through video would be an example of this form factor.
*
*
* See Also
*
* {@link #XR_NULL_SYSTEM_ID NULL_SYSTEM_ID}, {@link XrSystemGetInfo}, {@link #xrGetSystem GetSystem}
*/
public static final int
XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY = 1,
XR_FORM_FACTOR_HANDHELD_DISPLAY = 2;
/**
* XrViewConfigurationType - Supported view configuration type
*
* Description
*
* The application selects its primary view configuration type when calling {@link #xrBeginSession BeginSession}, and that configuration remains constant for the lifetime of the session, until {@link #xrEndSession EndSession} is called.
*
* The number of views and the semantic meaning of each view index within a given view configuration is well-defined, specified below for all core view configurations. The predefined primary view configuration types are:
*
* Enumerant Descriptions
*
*
* - {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO VIEW_CONFIGURATION_TYPE_PRIMARY_MONO}. One view representing the form factor’s one primary display. For example, an AR phone’s screen. This configuration requires one element in {@link XrViewConfigurationProperties} and one projection in each {@link XrCompositionLayerProjection} layer.
* - {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO}. Two views representing the form factor’s two primary displays, which map to a left-eye and right-eye view. This configuration requires two views in {@link XrViewConfigurationProperties} and two views in each {@link XrCompositionLayerProjection} layer. View index 0 must represent the left eye and view index 1 must represent the right eye.
* - {@link XR11#XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET}. Four views representing the form factor’s primary stereo displays. This view configuration type represents a hardware independent way of providing foveated rendering. The view configuration adds two foveated inset views for the left and right eye separately to the already defined two views specified in the {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO} view configuration. View index 0 must represent the left eye and view index 1 must represent the right eye as specified in {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO} view configuration, and view index 2 must represent the left eye inset view and view index 3 must represent the right eye inset view. The new inset view 2 and view 3 must, after applying the pose and FoV projection to same plane, be contained within view 0 and 1 respectively. The inset views may have a higher resolution with respect to the same field of view as the corresponding wide FoV view for each eye. The runtime may blend between the views at the edges, so the application must not omit the inner field of view from being rendered in the outer view. The {@code fov} returned by {@link #xrLocateViews LocateViews} for each inset view relative to the corresponding outer stereo view may change at run-time, the {@code pose} for inset view and stereo view for each eye respectively must have the same values.
*
*
* The benefits of the {@link XR11#XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET} view configuration type can be demonstrated by looking at the rendered pixel count. For example, a Varjo Aero requires a pair of stereo views rendered at 4148 x 3556 (14.7 million pixels) to achieve a pixel density of 35 pixels per degree. By using four views, with an eye-tracked foveated inset covering about 1/9th of the full FoV and rendered with the same 35 pixels per degree and while the remaining views are dropped to 14 pixels per degree, the resolution of the inset is 1076 x 1076 (1.1 million pixels) and the resolution of the stereo views is 1660 x 1420 (2.3 million pixels). The total pixel count is 75% less with {@link XR11#XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO_WITH_FOVEATED_INSET} over the {@link #XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO} view configuration type.
*
* See Also
*
* {@link XrEventDataVisibilityMaskChangedKHR}, {@link XrSecondaryViewConfigurationLayerInfoMSFT}, {@link XrSecondaryViewConfigurationSessionBeginInfoMSFT}, {@link XrSecondaryViewConfigurationStateMSFT}, {@link XrSecondaryViewConfigurationSwapchainCreateInfoMSFT}, {@link XrSessionBeginInfo}, {@link XrViewConfigurationProperties}, {@link XrViewLocateInfo}, {@link #xrEnumerateEnvironmentBlendModes EnumerateEnvironmentBlendModes}, {@link MSFTCompositionLayerReprojection#xrEnumerateReprojectionModesMSFT EnumerateReprojectionModesMSFT}, {@link #xrEnumerateViewConfigurationViews EnumerateViewConfigurationViews}, {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations}, {@link #xrGetViewConfigurationProperties GetViewConfigurationProperties}, {@link KHRVisibilityMask#xrGetVisibilityMaskKHR GetVisibilityMaskKHR}
*/
public static final int
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO = 1,
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO = 2;
/**
* XrEnvironmentBlendMode - Environment blend modes
*
* Enumerant Descriptions
*
*
* - {@link #XR_ENVIRONMENT_BLEND_MODE_OPAQUE ENVIRONMENT_BLEND_MODE_OPAQUE}. The composition layers will be displayed with no view of the physical world behind them. The composited image will be interpreted as an RGB image, ignoring the composited alpha channel. This is the typical mode for VR experiences, although this mode can also be supported on devices that support video passthrough.
* - {@link #XR_ENVIRONMENT_BLEND_MODE_ADDITIVE ENVIRONMENT_BLEND_MODE_ADDITIVE}. The composition layers will be additively blended with the real world behind the display. The composited image will be interpreted as an RGB image, ignoring the composited alpha channel during the additive blending. This will cause black composited pixels to appear transparent. This is the typical mode for an AR experience on a see-through headset with an additive display, although this mode can also be supported on devices that support video passthrough.
* - {@link #XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND ENVIRONMENT_BLEND_MODE_ALPHA_BLEND}. The composition layers will be alpha-blended with the real world behind the display. The composited image will be interpreted as an RGBA image, with the composited alpha channel determining each pixel’s level of blending with the real world behind the display. This is the typical mode for an AR experience on a phone or headset that supports video passthrough.
*
*
* See Also
*
* {@link XrFrameEndInfo}, {@link XrSecondaryViewConfigurationLayerInfoMSFT}, {@link #xrEnumerateEnvironmentBlendModes EnumerateEnvironmentBlendModes}
*/
public static final int
XR_ENVIRONMENT_BLEND_MODE_OPAQUE = 1,
XR_ENVIRONMENT_BLEND_MODE_ADDITIVE = 2,
XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND = 3;
/**
* XrSpaceVelocityFlagBits - Space velocity flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_SPACE_VELOCITY_LINEAR_VALID_BIT SPACE_VELOCITY_LINEAR_VALID_BIT} — Indicates that the {@code linearVelocity} member contains valid data. Applications must not read the {@code linearVelocity} field if this flag is unset.
* - {@link #XR_SPACE_VELOCITY_ANGULAR_VALID_BIT SPACE_VELOCITY_ANGULAR_VALID_BIT} — Indicates that the {@code angularVelocity} member contains valid data. Applications must not read the {@code angularVelocity} field if this flag is unset.
*
*
* See Also
*
* {@link XrSpaceVelocity}
*/
public static final int
XR_SPACE_VELOCITY_LINEAR_VALID_BIT = 0x1,
XR_SPACE_VELOCITY_ANGULAR_VALID_BIT = 0x2;
/**
* XrReferenceSpaceType - Reference space types
*
* Description
*
* Brief introductions to core reference space types follow. Each has full requirements in a subsequent section, linked from these descriptions.
*
* Enumerant Descriptions
*
*
* - {@link #XR_REFERENCE_SPACE_TYPE_VIEW REFERENCE_SPACE_TYPE_VIEW}. The {@code VIEW} reference space tracks the view origin used to generate view transforms for the primary viewer (or centroid of view origins if stereo), with +Y up, +X to the right, and -Z forward. This space points in the forward direction for the viewer without incorporating the user’s eye orientation, and is not gravity-aligned.
* Runtimes must support {@code VIEW} reference space.
*
* - {@link #XR_REFERENCE_SPACE_TYPE_LOCAL REFERENCE_SPACE_TYPE_LOCAL}. The {@code LOCAL} reference space establishes a world-locked origin, gravity-aligned to exclude pitch and roll, with +Y up, +X to the right, and -Z forward. This space locks in both its initial position and orientation, which the runtime may define to be either the initial position at application launch or some other calibrated zero position.
* Runtimes must support {@code LOCAL} reference space.
*
* - {@link #XR_REFERENCE_SPACE_TYPE_STAGE REFERENCE_SPACE_TYPE_STAGE}. The {@code STAGE} reference space is a runtime-defined flat, rectangular space that is empty and can be walked around on. The origin is on the floor at the center of the rectangle, with +Y up, and the X and Z axes aligned with the rectangle edges. The runtime may not be able to locate spaces relative to the {@code STAGE} reference space if the user has not yet defined one within the runtime-specific UI. Applications can use {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect} to determine the extents of the {@code STAGE} reference space’s XZ bounds rectangle, if defined.
* Support for the {@code STAGE} reference space is optional.
*
* - {@link XR11#XR_REFERENCE_SPACE_TYPE_LOCAL_FLOOR REFERENCE_SPACE_TYPE_LOCAL_FLOOR}. (provided by {@code XR_VERSION_1_1}) Similar to {@code LOCAL} space, the {@code LOCAL_FLOOR} reference space establishes a world-locked origin, gravity-aligned to exclude pitch and roll, with +Y up, +X to the right, and -Z forward. However, the origin of this space is defined to be on an estimate of the floor level.
* Runtimes must support {@code LOCAL_FLOOR} reference space.
*
*
*
* An {@code XrSpace} handle for a reference space is created using {@link #xrCreateReferenceSpace CreateReferenceSpace}, by specifying the chosen reference space type and a pose within the natural reference frame defined for that reference space type.
*
* Runtimes implement well-known reference spaces from {@code XrReferenceSpaceType} if they support tracking of that kind. Available reference space types are indicated by {@link #xrEnumerateReferenceSpaces EnumerateReferenceSpaces}. Note that other spaces can be created as well, such as pose action spaces created by {@link #xrCreateActionSpace CreateActionSpace}, which are not enumerated by that API.
*
* See Also
*
* {@link XrEventDataReferenceSpaceChangePending}, {@link XrReferenceSpaceCreateInfo}, {@link #xrEnumerateReferenceSpaces EnumerateReferenceSpaces}, {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect}
*/
public static final int
XR_REFERENCE_SPACE_TYPE_VIEW = 1,
XR_REFERENCE_SPACE_TYPE_LOCAL = 2,
XR_REFERENCE_SPACE_TYPE_STAGE = 3;
/**
* XrSpaceLocationFlagBits - Space location flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_SPACE_LOCATION_ORIENTATION_VALID_BIT SPACE_LOCATION_ORIENTATION_VALID_BIT} indicates that the {@code pose} field’s {@code orientation} field contains valid data. For a space location tracking a device with its own inertial tracking, {@link #XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT SPACE_LOCATION_ORIENTATION_TRACKED_BIT} should remain set when this bit is set. Applications must not read the {@code pose} field’s {@code orientation} if this flag is unset.
* - {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} indicates that the {@code pose} field’s {@code position} field contains valid data. When a space location loses tracking, runtimes should continue to provide valid but untracked {@code position} values that are inferred or last-known, so long as it’s still meaningful for the application to use that position, clearing {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT} until positional tracking is recovered. Applications must not read the {@code pose} field’s {@code position} if this flag is unset.
* - {@link #XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT SPACE_LOCATION_ORIENTATION_TRACKED_BIT} indicates that the {@code pose} field’s {@code orientation} field represents an actively tracked orientation. For a space location tracking a device with its own inertial tracking, this bit should remain set when {@link #XR_SPACE_LOCATION_ORIENTATION_VALID_BIT SPACE_LOCATION_ORIENTATION_VALID_BIT} is set. For a space location tracking an object whose orientation is no longer known during tracking loss (e.g. an observed QR code), runtimes should continue to provide valid but untracked {@code orientation} values, so long as it’s still meaningful for the application to use that orientation.
* - {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT} indicates that the {@code pose} field’s {@code position} field represents an actively tracked position. When a space location loses tracking, runtimes should continue to provide valid but untracked {@code position} values that are inferred or last-known, e.g. based on neck model updates, inertial dead reckoning, or a last-known position, so long as it’s still meaningful for the application to use that position.
*
*
* See Also
*
* {@link XrSpaceLocation}, {@link #xrLocateSpace LocateSpace}
*/
public static final int
XR_SPACE_LOCATION_ORIENTATION_VALID_BIT = 0x1,
XR_SPACE_LOCATION_POSITION_VALID_BIT = 0x2,
XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT = 0x4,
XR_SPACE_LOCATION_POSITION_TRACKED_BIT = 0x8;
/**
* XrSwapchainCreateFlagBits - Swapchain creation flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT} indicates that the swapchain’s images will be protected from CPU access, using a mechanism such as Vulkan protected memory.
* - {@link #XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT SWAPCHAIN_CREATE_STATIC_IMAGE_BIT} indicates that the application will acquire and release only one image to this swapchain over its entire lifetime. The runtime must allocate only one swapchain image.
*
*
* A runtime may implement any of these, but is not required to. A runtime must return {@link #XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED} from {@link #xrCreateSwapchain CreateSwapchain} if an {@code XrSwapchainCreateFlags} bit is requested but not implemented.
*
* See Also
*
* {@link XrSwapchainCreateInfo}
*/
public static final int
XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT = 0x1,
XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT = 0x2;
/**
* XrSwapchainUsageFlagBits - Swapchain usage flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT} — Specifies that the image may be a color rendering target.
* - {@link #XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT} — Specifies that the image may be a depth/stencil rendering target.
* - {@link #XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT} — Specifies that the image may be accessed out of order and that access may be via atomic operations.
* - {@link #XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT SWAPCHAIN_USAGE_TRANSFER_SRC_BIT} — Specifies that the image may be used as the source of a transfer operation.
* - {@link #XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT SWAPCHAIN_USAGE_TRANSFER_DST_BIT} — Specifies that the image may be used as the destination of a transfer operation.
* - {@link #XR_SWAPCHAIN_USAGE_SAMPLED_BIT SWAPCHAIN_USAGE_SAMPLED_BIT} — Specifies that the image may be sampled by a shader.
* - {@link #XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT} — Specifies that the image may be reinterpreted as another image format.
* - {@link MNDSwapchainUsageInputAttachmentBit#XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND} — Specifies that the image may be used as a input attachment. (Added by the {@link MNDSwapchainUsageInputAttachmentBit XR_MND_swapchain_usage_input_attachment_bit} extension)
* - {@link KHRSwapchainUsageInputAttachmentBit#XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR} — Specifies that the image may be used as a input attachment. (Added by the {@link KHRSwapchainUsageInputAttachmentBit XR_KHR_swapchain_usage_input_attachment_bit} extension)
*
*
* See Also
*
* {@link XrSwapchainCreateInfo}, {@link #xrCreateSwapchain CreateSwapchain}
*/
public static final int
XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = 0x1,
XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x2,
XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = 0x4,
XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = 0x8,
XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT = 0x10,
XR_SWAPCHAIN_USAGE_SAMPLED_BIT = 0x20,
XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = 0x40;
/**
* XrCompositionLayerFlagBits - Composition layer flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT} (deprecated — ignored) — Enables chromatic aberration correction when not done by default. This flag has no effect on any known conformant runtime, and is officially deprecated in OpenXR 1.1.
* - {@link #XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT} — Enables the layer texture alpha channel.
* - {@link #XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT} — Indicates the texture color channels have not been premultiplied by the texture alpha channel.
* - {@link EXTCompositionLayerInvertedAlpha#XR_COMPOSITION_LAYER_INVERTED_ALPHA_BIT_EXT COMPOSITION_LAYER_INVERTED_ALPHA_BIT_EXT} — Indicates that the texture alpha channel stores transparency instead of opacity, and is to be inverted before layer blending. (Added by the {@link EXTCompositionLayerInvertedAlpha XR_EXT_composition_layer_inverted_alpha} extension)
*
*
* See Also
*
* {@link XrCompositionLayerProjection}, {@link XrCompositionLayerQuad}
*/
public static final int
XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT = 0x1,
XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT = 0x2,
XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT = 0x4;
/**
* XrViewStateFlagBits - View state flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_VIEW_STATE_ORIENTATION_VALID_BIT VIEW_STATE_ORIENTATION_VALID_BIT} indicates whether all {@link XrView} orientations contain valid data. Applications must not read any of the {@link XrView} {@code pose} {@code orientation} fields if this flag is unset. {@link #XR_VIEW_STATE_ORIENTATION_TRACKED_BIT VIEW_STATE_ORIENTATION_TRACKED_BIT} should generally remain set when this bit is set for views on a tracked headset or handheld device.
* - {@link #XR_VIEW_STATE_POSITION_VALID_BIT VIEW_STATE_POSITION_VALID_BIT} indicates whether all {@link XrView} positions contain valid data. Applications must not read any of the {@link XrView}{@code ::pose} {@code position} fields if this flag is unset. When a view loses tracking, runtimes should continue to provide valid but untracked view {@code position} values that are inferred or last-known, so long as it’s still meaningful for the application to render content using that position, clearing {@link #XR_VIEW_STATE_POSITION_TRACKED_BIT VIEW_STATE_POSITION_TRACKED_BIT} until tracking is recovered.
* - {@link #XR_VIEW_STATE_ORIENTATION_TRACKED_BIT VIEW_STATE_ORIENTATION_TRACKED_BIT} indicates whether all {@link XrView} orientations represent an actively tracked orientation. This bit should generally remain set when {@link #XR_VIEW_STATE_ORIENTATION_VALID_BIT VIEW_STATE_ORIENTATION_VALID_BIT} is set for views on a tracked headset or handheld device.
* - {@link #XR_VIEW_STATE_POSITION_TRACKED_BIT VIEW_STATE_POSITION_TRACKED_BIT} indicates whether all {@link XrView} positions represent an actively tracked position. When a view loses tracking, runtimes should continue to provide valid but untracked view {@code position} values that are inferred or last-known, e.g. based on neck model updates, inertial dead reckoning, or a last-known position, so long as it’s still meaningful for the application to render content using that position.
*
*
* See Also
*
* {@link XrView}, {@link XrViewState}, {@link #xrLocateViews LocateViews}
*/
public static final int
XR_VIEW_STATE_ORIENTATION_VALID_BIT = 0x1,
XR_VIEW_STATE_POSITION_VALID_BIT = 0x2,
XR_VIEW_STATE_ORIENTATION_TRACKED_BIT = 0x4,
XR_VIEW_STATE_POSITION_TRACKED_BIT = 0x8;
/**
* XrActionType - XrAction type
*
* Enumerant Descriptions
*
*
* - {@link #XR_ACTION_TYPE_BOOLEAN_INPUT ACTION_TYPE_BOOLEAN_INPUT}. The action can be passed to {@link #xrGetActionStateBoolean GetActionStateBoolean} to retrieve a boolean value.
* - {@link #XR_ACTION_TYPE_FLOAT_INPUT ACTION_TYPE_FLOAT_INPUT}. The action can be passed to {@link #xrGetActionStateFloat GetActionStateFloat} to retrieve a float value.
* - {@link #XR_ACTION_TYPE_VECTOR2F_INPUT ACTION_TYPE_VECTOR2F_INPUT}. The action can be passed to {@link #xrGetActionStateVector2f GetActionStateVector2f} to retrieve a 2D float vector.
* - {@link #XR_ACTION_TYPE_POSE_INPUT ACTION_TYPE_POSE_INPUT}. The action can can be passed to {@link #xrCreateActionSpace CreateActionSpace} to create a space.
* - {@link #XR_ACTION_TYPE_VIBRATION_OUTPUT ACTION_TYPE_VIBRATION_OUTPUT}. The action can be passed to {@link #xrApplyHapticFeedback ApplyHapticFeedback} to send a haptic event to the runtime.
*
*
* See Also
*
* {@link XrActionCreateInfo}, {@link #xrCreateActionSet CreateActionSet}
*/
public static final int
XR_ACTION_TYPE_BOOLEAN_INPUT = 1,
XR_ACTION_TYPE_FLOAT_INPUT = 2,
XR_ACTION_TYPE_VECTOR2F_INPUT = 3,
XR_ACTION_TYPE_POSE_INPUT = 4,
XR_ACTION_TYPE_VIBRATION_OUTPUT = 100;
/**
* XrInputSourceLocalizedNameFlagBits - Input source localized name flags
*
* Description
*
* The flag bits have the following meanings:
*
* Flag Descriptions
*
*
* - {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT} indicates that the runtime must include the user path portion of the string in the result, if available. E.g. {@code Left Hand}.
* - {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT} indicates that the runtime must include the interaction profile portion of the string in the result, if available. E.g. {@code Vive Controller}.
* - {@link #XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT} indicates that the runtime must include the input component portion of the string in the result, if available. E.g. {@code Trigger}.
*
*
* See Also
*
* {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName}
*/
public static final int
XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT = 0x1,
XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT = 0x2,
XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT = 0x4;
/**
* XrEyeVisibility - Eye visibility selector
*
* Enumerant Descriptions
*
*
* - {@link #XR_EYE_VISIBILITY_BOTH EYE_VISIBILITY_BOTH} displays the layer to both eyes.
* - {@link #XR_EYE_VISIBILITY_LEFT EYE_VISIBILITY_LEFT} displays the layer to the viewer’s physical left eye.
* - {@link #XR_EYE_VISIBILITY_RIGHT EYE_VISIBILITY_RIGHT} displays the layer to the viewer’s physical right eye.
*
*
* See Also
*
* {@link XrCompositionLayerCubeKHR}, {@link XrCompositionLayerCylinderKHR}, {@link XrCompositionLayerEquirect2KHR}, {@link XrCompositionLayerEquirectKHR}, {@link XrCompositionLayerQuad}
*/
public static final int
XR_EYE_VISIBILITY_BOTH = 0,
XR_EYE_VISIBILITY_LEFT = 1,
XR_EYE_VISIBILITY_RIGHT = 2;
/**
* XrSessionState - Session lifecycle state
*
* Enumerant Descriptions
*
*
* - {@link #XR_SESSION_STATE_UNKNOWN SESSION_STATE_UNKNOWN}. An unknown state. The runtime must not return this value in an {@link XrEventDataSessionStateChanged} event.
* - {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE}. The initial state after calling {@link #xrCreateSession CreateSession} or returned to after calling {@link #xrEndSession EndSession}.
* - {@link #XR_SESSION_STATE_READY SESSION_STATE_READY}. The application is ready to call {@link #xrBeginSession BeginSession} and sync its frame loop with the runtime.
* - {@link #XR_SESSION_STATE_SYNCHRONIZED SESSION_STATE_SYNCHRONIZED}. The application has synced its frame loop with the runtime but is not visible to the user.
* - {@link #XR_SESSION_STATE_VISIBLE SESSION_STATE_VISIBLE}. The application has synced its frame loop with the runtime and is visible to the user but cannot receive XR input.
* - {@link #XR_SESSION_STATE_FOCUSED SESSION_STATE_FOCUSED}. The application has synced its frame loop with the runtime, is visible to the user and can receive XR input.
* - {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING}. The application should exit its frame loop and call {@link #xrEndSession EndSession}.
* - {@link #XR_SESSION_STATE_LOSS_PENDING SESSION_STATE_LOSS_PENDING}. The session is in the process of being lost. The application should destroy the current session and can optionally recreate it.
* - {@link #XR_SESSION_STATE_EXITING SESSION_STATE_EXITING}. The application should end its XR experience and not automatically restart it.
*
*
* The {@link #XR_SESSION_STATE_UNKNOWN SESSION_STATE_UNKNOWN} state must not be returned by the runtime, and is only defined to avoid 0 being a valid state.
*
* Receiving the {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} state indicates that the runtime considers the session is idle. Applications in this state should minimize resource consumption but continue to call {@link #xrPollEvent PollEvent} at some reasonable cadence.
*
* Receiving the {@link #XR_SESSION_STATE_READY SESSION_STATE_READY} state indicates that the runtime desires the application to prepare rendering resources, begin its session and synchronize its frame loop with the runtime.
*
* The application does this by successfully calling {@link #xrBeginSession BeginSession} and then running its frame loop by calling {@link #xrWaitFrame WaitFrame}, {@link #xrBeginFrame BeginFrame} and {@link #xrEndFrame EndFrame} in a loop. If the runtime wishes to return the session to the {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} state, it must wait until the application calls {@link #xrBeginSession BeginSession}. After returning from the {@link #xrBeginSession BeginSession} call, the runtime may then immediately transition forward through the {@link #XR_SESSION_STATE_SYNCHRONIZED SESSION_STATE_SYNCHRONIZED} state to the {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} state, to request that the application end this session. If the system supports a user engagement sensor and runtime is in {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} state, the runtime may wait until the user starts engaging with the device before transitioning to the {@link #XR_SESSION_STATE_READY SESSION_STATE_READY} state.
*
* Receiving the {@link #XR_SESSION_STATE_SYNCHRONIZED SESSION_STATE_SYNCHRONIZED} state indicates that the application has synchronized its frame loop with the runtime, but its frames are not visible to the user. The application should continue running its frame loop by calling {@link #xrWaitFrame WaitFrame}, {@link #xrBeginFrame BeginFrame} and {@link #xrEndFrame EndFrame}, although it should avoid heavy GPU work so that other visible applications can take CPU and GPU precedence. The application can save resources here by skipping rendering and not submitting any composition layers until {@link #xrWaitFrame WaitFrame} returns an {@link XrFrameState} with {@code shouldRender} set to true. A runtime may use this frame synchronization to facilitate seamless switching from a previous XR application to this application on a frame boundary.
*
* Receiving the {@link #XR_SESSION_STATE_VISIBLE SESSION_STATE_VISIBLE} state indicates that the application has synchronized its frame loop with the runtime, and the session’s frames will be visible to the user, but the session is not eligible to receive XR input. An application may be visible but not have focus, for example when the runtime is composing a modal pop-up on top of the application’s rendered frames. The application should continue running its frame loop, rendering and submitting its composition layers, although it may wish to pause its experience, as users cannot interact with the application at this time. It is important for applications to continue rendering when visible, even when they do not have focus, so the user continues to see something reasonable underneath modal pop-ups. Runtimes should make input actions inactive while the application is unfocused, and applications should react to an inactive input action by skipping rendering of that action’s input avatar (depictions of hands or other tracked objects controlled by the user).
*
* Receiving the {@link #XR_SESSION_STATE_FOCUSED SESSION_STATE_FOCUSED} state indicates that the application has synchronized its frame loop with the runtime, the session’s frames will be visible to the user, and the session is eligible to receive XR input. The runtime should only give one session XR input focus at any given time. The application should be running its frame loop, rendering and submitting composition layers, including input avatars (depictions of hands or other tracked objects controlled by the user) for any input actions that are active. The runtime should avoid rendering its own input avatars when an application is focused, unless input from a given source is being captured by the runtime at the moment.
*
* Receiving the {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} state indicates that the runtime has determined that the application should halt its rendering loop. Applications should exit their rendering loop and call {@link #xrEndSession EndSession} when in this state. A possible reason for this would be to minimize contention between multiple applications. If the system supports a user engagement sensor and the session is running, the runtime may transition to the {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} state when the user stops engaging with the device.
*
* Receiving the {@link #XR_SESSION_STATE_EXITING SESSION_STATE_EXITING} state indicates the runtime wishes the application to terminate its XR experience, typically due to a user request via a runtime user interface. Applications should gracefully end their process when in this state if they do not have a non-XR user experience.
*
* Receiving the {@link #XR_SESSION_STATE_LOSS_PENDING SESSION_STATE_LOSS_PENDING} state indicates the runtime is no longer able to operate with the current session, for example due to the loss of a display hardware connection. An application should call {@link #xrDestroySession DestroySession} and may end its process or decide to poll {@link #xrGetSystem GetSystem} at some reasonable cadence to get a new {@code XrSystemId}, and re-initialize all graphics resources related to the new system, and then create a new session using {@link #xrCreateSession CreateSession}. After the event is queued, subsequent calls to functions that accept {@code XrSession} parameters must no longer return any success code other than {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING} for the given {@code XrSession} handle. The {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING} success result is returned for an unspecified grace period of time, and the functions that return it simulate success in their behavior. If the runtime has no reasonable way to successfully complete a given function (e.g. {@link #xrCreateSwapchain CreateSwapchain}) when a lost session is pending, or if the runtime is not able to provide the application a grace period, the runtime may return {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}. Thereafter, functions which accept {@code XrSession} parameters for the lost session may return {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST} to indicate that the function failed and the given session was lost. The {@code XrSession} handle and child handles are henceforth unusable and should be destroyed by the application in order to immediately free up resources associated with those handles.
*
* See Also
*
* {@link XrEventDataSessionStateChanged}, {@link #xrPollEvent PollEvent}
*/
public static final int
XR_SESSION_STATE_UNKNOWN = 0,
XR_SESSION_STATE_IDLE = 1,
XR_SESSION_STATE_READY = 2,
XR_SESSION_STATE_SYNCHRONIZED = 3,
XR_SESSION_STATE_VISIBLE = 4,
XR_SESSION_STATE_FOCUSED = 5,
XR_SESSION_STATE_STOPPING = 6,
XR_SESSION_STATE_LOSS_PENDING = 7,
XR_SESSION_STATE_EXITING = 8;
/**
* XrObjectType - Specify an enumeration to track object handle types
*
* Description
*
* The {@code XrObjectType} enumeration defines values, each of which corresponds to a specific OpenXR handle type. These values can be used to associate debug information with a particular type of object through one or more extensions.
*
* The following table defines {@code XrObjectType} and OpenXR Handle relationships in the core specification:
*
*
* {@code XrObjectType} OpenXR Handle Type
*
* {@link #XR_OBJECT_TYPE_UNKNOWN OBJECT_TYPE_UNKNOWN} Unknown/Undefined Handle
* {@link #XR_OBJECT_TYPE_INSTANCE OBJECT_TYPE_INSTANCE} {@code XrInstance}
* {@link #XR_OBJECT_TYPE_SESSION OBJECT_TYPE_SESSION} {@code XrSession}
* {@link #XR_OBJECT_TYPE_SWAPCHAIN OBJECT_TYPE_SWAPCHAIN} {@code XrSwapchain}
* {@link #XR_OBJECT_TYPE_SPACE OBJECT_TYPE_SPACE} {@code XrSpace}
* {@link #XR_OBJECT_TYPE_ACTION_SET OBJECT_TYPE_ACTION_SET} {@code XrActionSet}
* {@link #XR_OBJECT_TYPE_ACTION OBJECT_TYPE_ACTION} {@code XrAction}
*
*
*
* See Also
*
* {@link XrDebugUtilsObjectNameInfoEXT}
*/
public static final int
XR_OBJECT_TYPE_UNKNOWN = 0,
XR_OBJECT_TYPE_INSTANCE = 1,
XR_OBJECT_TYPE_SESSION = 2,
XR_OBJECT_TYPE_SWAPCHAIN = 3,
XR_OBJECT_TYPE_SPACE = 4,
XR_OBJECT_TYPE_ACTION_SET = 5,
XR_OBJECT_TYPE_ACTION = 6;
/** OpenXR current version number. */
public static final long XR_CURRENT_API_VERSION = XR_MAKE_VERSION(1, 1, 43);
/**
* The version of the OpenXR 1.0 API.
*
* The "major" and "minor" components are always 1.0, while the "patch" component matches {@link #XR_CURRENT_API_VERSION CURRENT_API_VERSION}.
*/
public static final long XR_API_VERSION_1_0 = XR_MAKE_VERSION(1, 0, XR_VERSION_PATCH(XR_CURRENT_API_VERSION));
/** Compile-time symbols, ignore. */
public static final int
XR_USE_GRAPHICS_API_OPENGL = 0,
XR_USE_GRAPHICS_API_OPENGL_ES = 0,
XR_USE_GRAPHICS_API_VULKAN = 0,
XR_USE_PLATFORM_EGL = 0,
XR_USE_PLATFORM_WIN32 = 0,
XR_USE_PLATFORM_XLIB = 0,
XR_USE_PLATFORM_XCB = 0,
XR_USE_PLATFORM_WAYLAND = 0;
/** API Constants */
public static final long
XR_NULL_HANDLE = 0x0L,
XR_NULL_PATH = 0x0L,
XR_NULL_SYSTEM_ID = 0x0L,
XR_NO_DURATION = 0x0L,
XR_INFINITE_DURATION = 0x7FFF_FFFF_FFFF_FFFFL,
XR_MIN_HAPTIC_DURATION = 0xFFFFFFFFFFFFFFFFL,
XR_MAX_EVENT_DATA_SIZE = XrEventDataBuffer.SIZEOF;
/** API Constants */
public static final float XR_FREQUENCY_UNSPECIFIED = 0f;
/** API Constants */
public static final int
XR_TRUE = 1,
XR_FALSE = 0,
XR_MAX_EXTENSION_NAME_SIZE = 128,
XR_MAX_API_LAYER_NAME_SIZE = 256,
XR_MAX_API_LAYER_DESCRIPTION_SIZE = 256,
XR_MAX_SYSTEM_NAME_SIZE = 256,
XR_MAX_APPLICATION_NAME_SIZE = 128,
XR_MAX_ENGINE_NAME_SIZE = 128,
XR_MAX_RUNTIME_NAME_SIZE = 128,
XR_MAX_PATH_LENGTH = 256,
XR_MAX_STRUCTURE_NAME_SIZE = 64,
XR_MAX_RESULT_STRING_SIZE = 64,
XR_MAX_GRAPHICS_APIS_SUPPORTED = 32,
XR_MAX_ACTION_SET_NAME_SIZE = 64,
XR_MAX_ACTION_NAME_SIZE = 64,
XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE = 128,
XR_MAX_LOCALIZED_ACTION_NAME_SIZE = 128,
XR_MIN_COMPOSITION_LAYERS_SUPPORTED = 16,
XR_UUID_SIZE = 16;
protected XR10() {
throw new UnsupportedOperationException();
}
// --- [ xrGetInstanceProcAddr ] ---
/** Unsafe version of: {@link #xrGetInstanceProcAddr GetInstanceProcAddr} */
public static int nxrGetInstanceProcAddr(long instance, long name, long function) {
long __functionAddress = XR.getGlobalCommands().xrGetInstanceProcAddr;
return callPPPI(instance, name, function, __functionAddress);
}
/**
* Gets a function pointer for an OpenXR function.
*
* C Specification
*
* Function pointers for all OpenXR functions can be obtained with the function {@link #xrGetInstanceProcAddr GetInstanceProcAddr}.
*
*
* XrResult xrGetInstanceProcAddr(
* XrInstance instance,
* const char* name,
* PFN_xrVoidFunction* function);
*
* Description
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this function as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs. Loaders must export function symbols for all core OpenXR functions. Because of this, applications that use only the core OpenXR functions have no need to use {@link #xrGetInstanceProcAddr GetInstanceProcAddr}.
*
* Because an application can call {@link #xrGetInstanceProcAddr GetInstanceProcAddr} before creating an instance, {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return a valid function pointer when the {@code instance} parameter is {@link #XR_NULL_HANDLE NULL_HANDLE} and the {@code name} parameter is one of the following strings:
*
* No Instance Required
*
*
* - {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}
* - {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties}
* - {@link #xrCreateInstance CreateInstance}
*
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID} if {@code name} is not one of the above strings and {@code instance} is {@link #XR_NULL_HANDLE NULL_HANDLE}. {@link #xrGetInstanceProcAddr GetInstanceProcAddr} may return {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID} if {@code name} is not one of the above strings and {@code instance} is invalid but not {@link #XR_NULL_HANDLE NULL_HANDLE}.
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED} if {@code instance} is a valid instance and the string specified in {@code name} is not the name of an OpenXR core or enabled extension function.
*
* If {@code name} is the name of an extension function, then the result returned by {@link #xrGetInstanceProcAddr GetInstanceProcAddr} will depend upon how the {@code instance} was created. If {@code instance} was created with the related extension’s name appearing in the {@link XrInstanceCreateInfo}{@code ::enabledExtensionNames} array, then {@link #xrGetInstanceProcAddr GetInstanceProcAddr} returns a valid function pointer. If the related extension’s name did not appear in the {@link XrInstanceCreateInfo}{@code ::enabledExtensionNames} array during the creation of {@code instance}, then {@link #xrGetInstanceProcAddr GetInstanceProcAddr} returns {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}. Because of this, function pointers returned by {@link #xrGetInstanceProcAddr GetInstanceProcAddr} using one {@code XrInstance} may not be valid when used with objects related to a different {@code XrInstance}.
*
* The returned function pointer is of type {@code PFN_xrVoidFunction}, and must be cast by the application to the type of the function being queried.
*
* The table below defines the various use cases for {@link #xrGetInstanceProcAddr GetInstanceProcAddr} and return value (“{@code fp}” is “{@code function pointer}”) for each case.
*
* xrGetInstanceProcAddr behavior
*
*
* {@code instance} parameter {@code name} parameter return value
*
* * {@code NULL} undefined
* invalid instance * undefined
* {@code NULL} {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} fp
* {@code NULL} {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties} fp
* {@code NULL} {@link #xrCreateInstance CreateInstance} fp
* {@code NULL} * (any {@code name} not covered above) {@code NULL}
* instance core OpenXR function fp1
* instance enabled extension function for {@code instance} fp1
* instance * (any {@code name} not covered above) {@code NULL}
*
*
*
*
* - 1
* - The returned function pointer must only be called with a handle (the first parameter) that is {@code instance} or a child of {@code instance}.
*
*
* Valid Usage (Implicit)
*
*
* - If {@code instance} is not {@link #XR_NULL_HANDLE NULL_HANDLE}, {@code instance} must be a valid {@code XrInstance} handle
* - {@code name} must be a null-terminated UTF-8 string
* - {@code function} must be a pointer to a {@code PFN_xrVoidFunction} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
*
*
*
* @param instance the instance that the function pointer will be compatible with, or {@code NULL} for functions not dependent on any instance.
* @param name the name of the function to obtain.
* @param function the address of the function pointer to get.
*/
@NativeType("XrResult")
public static int xrGetInstanceProcAddr(@NativeType("XrInstance") @Nullable XrInstance instance, @NativeType("char const *") ByteBuffer name, @NativeType("PFN_xrVoidFunction *") PointerBuffer function) {
if (CHECKS) {
checkNT1(name);
check(function, 1);
}
return nxrGetInstanceProcAddr(memAddressSafe(instance), memAddress(name), memAddress(function));
}
/**
* Gets a function pointer for an OpenXR function.
*
* C Specification
*
* Function pointers for all OpenXR functions can be obtained with the function {@link #xrGetInstanceProcAddr GetInstanceProcAddr}.
*
*
* XrResult xrGetInstanceProcAddr(
* XrInstance instance,
* const char* name,
* PFN_xrVoidFunction* function);
*
* Description
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this function as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs. Loaders must export function symbols for all core OpenXR functions. Because of this, applications that use only the core OpenXR functions have no need to use {@link #xrGetInstanceProcAddr GetInstanceProcAddr}.
*
* Because an application can call {@link #xrGetInstanceProcAddr GetInstanceProcAddr} before creating an instance, {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return a valid function pointer when the {@code instance} parameter is {@link #XR_NULL_HANDLE NULL_HANDLE} and the {@code name} parameter is one of the following strings:
*
* No Instance Required
*
*
* - {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}
* - {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties}
* - {@link #xrCreateInstance CreateInstance}
*
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID} if {@code name} is not one of the above strings and {@code instance} is {@link #XR_NULL_HANDLE NULL_HANDLE}. {@link #xrGetInstanceProcAddr GetInstanceProcAddr} may return {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID} if {@code name} is not one of the above strings and {@code instance} is invalid but not {@link #XR_NULL_HANDLE NULL_HANDLE}.
*
* {@link #xrGetInstanceProcAddr GetInstanceProcAddr} must return {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED} if {@code instance} is a valid instance and the string specified in {@code name} is not the name of an OpenXR core or enabled extension function.
*
* If {@code name} is the name of an extension function, then the result returned by {@link #xrGetInstanceProcAddr GetInstanceProcAddr} will depend upon how the {@code instance} was created. If {@code instance} was created with the related extension’s name appearing in the {@link XrInstanceCreateInfo}{@code ::enabledExtensionNames} array, then {@link #xrGetInstanceProcAddr GetInstanceProcAddr} returns a valid function pointer. If the related extension’s name did not appear in the {@link XrInstanceCreateInfo}{@code ::enabledExtensionNames} array during the creation of {@code instance}, then {@link #xrGetInstanceProcAddr GetInstanceProcAddr} returns {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}. Because of this, function pointers returned by {@link #xrGetInstanceProcAddr GetInstanceProcAddr} using one {@code XrInstance} may not be valid when used with objects related to a different {@code XrInstance}.
*
* The returned function pointer is of type {@code PFN_xrVoidFunction}, and must be cast by the application to the type of the function being queried.
*
* The table below defines the various use cases for {@link #xrGetInstanceProcAddr GetInstanceProcAddr} and return value (“{@code fp}” is “{@code function pointer}”) for each case.
*
* xrGetInstanceProcAddr behavior
*
*
* {@code instance} parameter {@code name} parameter return value
*
* * {@code NULL} undefined
* invalid instance * undefined
* {@code NULL} {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties} fp
* {@code NULL} {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties} fp
* {@code NULL} {@link #xrCreateInstance CreateInstance} fp
* {@code NULL} * (any {@code name} not covered above) {@code NULL}
* instance core OpenXR function fp1
* instance enabled extension function for {@code instance} fp1
* instance * (any {@code name} not covered above) {@code NULL}
*
*
*
*
* - 1
* - The returned function pointer must only be called with a handle (the first parameter) that is {@code instance} or a child of {@code instance}.
*
*
* Valid Usage (Implicit)
*
*
* - If {@code instance} is not {@link #XR_NULL_HANDLE NULL_HANDLE}, {@code instance} must be a valid {@code XrInstance} handle
* - {@code name} must be a null-terminated UTF-8 string
* - {@code function} must be a pointer to a {@code PFN_xrVoidFunction} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
*
*
*
* @param instance the instance that the function pointer will be compatible with, or {@code NULL} for functions not dependent on any instance.
* @param name the name of the function to obtain.
* @param function the address of the function pointer to get.
*/
@NativeType("XrResult")
public static int xrGetInstanceProcAddr(@NativeType("XrInstance") @Nullable XrInstance instance, @NativeType("char const *") CharSequence name, @NativeType("PFN_xrVoidFunction *") PointerBuffer function) {
if (CHECKS) {
check(function, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8(name, true);
long nameEncoded = stack.getPointerAddress();
return nxrGetInstanceProcAddr(memAddressSafe(instance), nameEncoded, memAddress(function));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ xrEnumerateApiLayerProperties ] ---
/**
* Unsafe version of: {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties}
*
* @param propertyCapacityInput the capacity of the {@code properties} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateApiLayerProperties(int propertyCapacityInput, long propertyCountOutput, long properties) {
long __functionAddress = XR.getGlobalCommands().xrEnumerateApiLayerProperties;
return callPPI(propertyCapacityInput, propertyCountOutput, properties, __functionAddress);
}
/**
* Returns up to requested number of global layer properties.
*
* C Specification
*
* To determine what set of API layers are available, OpenXR provides the {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties} function:
*
*
* XrResult xrEnumerateApiLayerProperties(
* uint32_t propertyCapacityInput,
* uint32_t* propertyCountOutput,
* XrApiLayerProperties* properties);
*
* Description
*
* The list of available layers may change at any time due to actions outside of the OpenXR runtime, so two calls to {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties} with the same parameters may return different results, or retrieve different {@code propertyCountOutput} values or {@code properties} contents.
*
* Once an instance has been created, the layers enabled for that instance will continue to be enabled and valid for the lifetime of that instance, even if some of them become unavailable for future instances.
*
* Valid Usage (Implicit)
*
*
* - {@code propertyCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code propertyCapacityInput} is not 0, {@code properties} must be a pointer to an array of {@code propertyCapacityInput} {@link XrApiLayerProperties} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
*
*
*
* See Also
*
* {@link XrApiLayerProperties}
*
* @param propertyCountOutput a pointer to the count of {@code properties} written, or a pointer to the required capacity in the case that {@code propertyCapacityInput} is insufficient.
* @param properties a pointer to an array of {@link XrApiLayerProperties} structures, but can be {@code NULL} if {@code propertyCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateApiLayerProperties(@NativeType("uint32_t *") IntBuffer propertyCountOutput, @NativeType("XrApiLayerProperties *") XrApiLayerProperties.@Nullable Buffer properties) {
if (CHECKS) {
check(propertyCountOutput, 1);
}
return nxrEnumerateApiLayerProperties(remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties));
}
// --- [ xrEnumerateInstanceExtensionProperties ] ---
/**
* Unsafe version of: {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}
*
* @param propertyCapacityInput the capacity of the {@code properties} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateInstanceExtensionProperties(long layerName, int propertyCapacityInput, long propertyCountOutput, long properties) {
long __functionAddress = XR.getGlobalCommands().xrEnumerateInstanceExtensionProperties;
return callPPPI(layerName, propertyCapacityInput, propertyCountOutput, properties, __functionAddress);
}
/**
* Returns properties of available instance extensions.
*
* C Specification
*
* The application can determine the available instance extensions by calling {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}:
*
*
* XrResult xrEnumerateInstanceExtensionProperties(
* const char* layerName,
* uint32_t propertyCapacityInput,
* uint32_t* propertyCountOutput,
* XrExtensionProperties* properties);
*
* Description
*
* Because the list of available layers may change externally between calls to {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, two calls may retrieve different results if a {@code layerName} is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.
*
* Valid Usage (Implicit)
*
*
* - If {@code layerName} is not {@code NULL}, {@code layerName} must be a null-terminated UTF-8 string
* - {@code propertyCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code propertyCapacityInput} is not 0, {@code properties} must be a pointer to an array of {@code propertyCapacityInput} {@link XrExtensionProperties} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_RUNTIME_UNAVAILABLE ERROR_RUNTIME_UNAVAILABLE}
* - {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT}
*
*
*
* See Also
*
* {@link XrExtensionProperties}
*
* @param layerName either {@code NULL} or a pointer to a string naming the API layer to retrieve extensions from, as returned by {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties}.
* @param propertyCountOutput a pointer to the count of {@code properties} written, or a pointer to the required capacity in the case that {@code propertyCapacityInput} is insufficient.
* @param properties a pointer to an array of {@link XrExtensionProperties} structures, but can be {@code NULL} if {@code propertyCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateInstanceExtensionProperties(@NativeType("char const *") @Nullable ByteBuffer layerName, @NativeType("uint32_t *") IntBuffer propertyCountOutput, @NativeType("XrExtensionProperties *") XrExtensionProperties.@Nullable Buffer properties) {
if (CHECKS) {
checkNT1Safe(layerName);
check(propertyCountOutput, 1);
}
return nxrEnumerateInstanceExtensionProperties(memAddressSafe(layerName), remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties));
}
/**
* Returns properties of available instance extensions.
*
* C Specification
*
* The application can determine the available instance extensions by calling {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}:
*
*
* XrResult xrEnumerateInstanceExtensionProperties(
* const char* layerName,
* uint32_t propertyCapacityInput,
* uint32_t* propertyCountOutput,
* XrExtensionProperties* properties);
*
* Description
*
* Because the list of available layers may change externally between calls to {@link #xrEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties}, two calls may retrieve different results if a {@code layerName} is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.
*
* Valid Usage (Implicit)
*
*
* - If {@code layerName} is not {@code NULL}, {@code layerName} must be a null-terminated UTF-8 string
* - {@code propertyCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code propertyCapacityInput} is not 0, {@code properties} must be a pointer to an array of {@code propertyCapacityInput} {@link XrExtensionProperties} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_RUNTIME_UNAVAILABLE ERROR_RUNTIME_UNAVAILABLE}
* - {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT}
*
*
*
* See Also
*
* {@link XrExtensionProperties}
*
* @param layerName either {@code NULL} or a pointer to a string naming the API layer to retrieve extensions from, as returned by {@link #xrEnumerateApiLayerProperties EnumerateApiLayerProperties}.
* @param propertyCountOutput a pointer to the count of {@code properties} written, or a pointer to the required capacity in the case that {@code propertyCapacityInput} is insufficient.
* @param properties a pointer to an array of {@link XrExtensionProperties} structures, but can be {@code NULL} if {@code propertyCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateInstanceExtensionProperties(@NativeType("char const *") @Nullable CharSequence layerName, @NativeType("uint32_t *") IntBuffer propertyCountOutput, @NativeType("XrExtensionProperties *") XrExtensionProperties.@Nullable Buffer properties) {
if (CHECKS) {
check(propertyCountOutput, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8Safe(layerName, true);
long layerNameEncoded = layerName == null ? NULL : stack.getPointerAddress();
return nxrEnumerateInstanceExtensionProperties(layerNameEncoded, remainingSafe(properties), memAddress(propertyCountOutput), memAddressSafe(properties));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ xrCreateInstance ] ---
/** Unsafe version of: {@link #xrCreateInstance CreateInstance} */
public static int nxrCreateInstance(long createInfo, long instance) {
long __functionAddress = XR.getGlobalCommands().xrCreateInstance;
if (CHECKS) {
XrInstanceCreateInfo.validate(createInfo);
}
return callPPI(createInfo, instance, __functionAddress);
}
/**
* Creates an OpenXR Instance.
*
* C Specification
*
* The {@link #xrCreateInstance CreateInstance} function is defined as:
*
*
* XrResult xrCreateInstance(
* const XrInstanceCreateInfo* createInfo,
* XrInstance* instance);
*
* Description
*
* {@link #xrCreateInstance CreateInstance} creates the {@code XrInstance}, then enables and initializes global API layers and extensions requested by the application. If an extension is provided by an API layer, both the API layer and extension must be specified at {@link #xrCreateInstance CreateInstance} time. If a specified API layer cannot be found, no {@code XrInstance} will be created and the function will return {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT}. Likewise, if a specified extension cannot be found, the call must return {@link #XR_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT} and no {@code XrInstance} will be created. Additionally, some runtimes may limit the number of concurrent instances that may be in use. If the application attempts to create more instances than a runtime can simultaneously support, {@link #xrCreateInstance CreateInstance} may return {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}.
*
* If the {@link XrApplicationInfo}{@code ::applicationName} is the empty string the runtime must return {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID}.
*
* If the {@link XrInstanceCreateInfo} structure contains a platform-specific extension for a platform other than the target platform, {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} may be returned. If a mandatory platform-specific extension is defined for the target platform but no matching extension struct is provided in {@link XrInstanceCreateInfo} the runtime must return {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}.
*
* Valid Usage (Implicit)
*
*
* - {@code createInfo} must be a pointer to a valid {@link XrInstanceCreateInfo} structure
* - {@code instance} must be a pointer to an {@code XrInstance} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_RUNTIME_UNAVAILABLE ERROR_RUNTIME_UNAVAILABLE}
* - {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID}
* - {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
* - {@link #XR_ERROR_EXTENSION_NOT_PRESENT ERROR_EXTENSION_NOT_PRESENT}
* - {@link XR11#XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED}
* - {@link #XR_ERROR_API_VERSION_UNSUPPORTED ERROR_API_VERSION_UNSUPPORTED}
* - {@link #XR_ERROR_API_LAYER_NOT_PRESENT ERROR_API_LAYER_NOT_PRESENT}
*
*
*
* See Also
*
* {@link XrInstanceCreateInfo}
*
* @param createInfo points to an instance of {@link XrInstanceCreateInfo} controlling creation of the instance.
* @param instance points to an {@code XrInstance} handle in which the resulting instance is returned.
*/
@NativeType("XrResult")
public static int xrCreateInstance(@NativeType("XrInstanceCreateInfo const *") XrInstanceCreateInfo createInfo, @NativeType("XrInstance *") PointerBuffer instance) {
if (CHECKS) {
check(instance, 1);
}
return nxrCreateInstance(createInfo.address(), memAddress(instance));
}
// --- [ xrDestroyInstance ] ---
/**
* Destroy an instance of OpenXR.
*
* C Specification
*
* The {@link #xrDestroyInstance DestroyInstance} function is defined as:
*
*
* XrResult xrDestroyInstance(
* XrInstance instance);
*
* Parameter Descriptions
*
*
* - {@code instance} is the handle to the instance to destroy.
*
*
* {@code XrInstance} handles are destroyed using {@link #xrDestroyInstance DestroyInstance}. When an {@code XrInstance} is destroyed, all handles that are children of that {@code XrInstance} are also destroyed.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
*
*
* Thread Safety
*
*
* - Access to {@code instance}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*/
@NativeType("XrResult")
public static int xrDestroyInstance(XrInstance instance) {
long __functionAddress = instance.getCapabilities().xrDestroyInstance;
return callPI(instance.address(), __functionAddress);
}
// --- [ xrGetInstanceProperties ] ---
/** Unsafe version of: {@link #xrGetInstanceProperties GetInstanceProperties} */
public static int nxrGetInstanceProperties(XrInstance instance, long instanceProperties) {
long __functionAddress = instance.getCapabilities().xrGetInstanceProperties;
return callPPI(instance.address(), instanceProperties, __functionAddress);
}
/**
* Gets information about the instance.
*
* C Specification
*
* The {@link #xrGetInstanceProperties GetInstanceProperties} function provides information about the instance and the associated runtime.
*
*
* XrResult xrGetInstanceProperties(
* XrInstance instance,
* XrInstanceProperties* instanceProperties);
*
* Description
*
* The {@code instanceProperties} parameter must be filled out by the runtime in response to this call, with information as defined in {@link XrInstanceProperties}.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code instanceProperties} must be a pointer to an {@link XrInstanceProperties} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
*
*
*
* See Also
*
* {@link XrInstanceProperties}
*
* @param instance a handle to an {@code XrInstance} previously created with {@link #xrCreateInstance CreateInstance}.
* @param instanceProperties points to an {@link XrInstanceProperties} which describes the {@code instance}.
*/
@NativeType("XrResult")
public static int xrGetInstanceProperties(XrInstance instance, @NativeType("XrInstanceProperties *") XrInstanceProperties instanceProperties) {
return nxrGetInstanceProperties(instance, instanceProperties.address());
}
// --- [ xrPollEvent ] ---
/** Unsafe version of: {@link #xrPollEvent PollEvent} */
public static int nxrPollEvent(XrInstance instance, long eventData) {
long __functionAddress = instance.getCapabilities().xrPollEvent;
return callPPI(instance.address(), eventData, __functionAddress);
}
/**
* Polls for events.
*
* C Specification
*
* The {@link #xrPollEvent PollEvent} function is defined as:
*
*
* XrResult xrPollEvent(
* XrInstance instance,
* XrEventDataBuffer* eventData);
*
* Description
*
* {@link #xrPollEvent PollEvent} polls for the next event and returns an event if one is available. {@link #xrPollEvent PollEvent} returns immediately regardless of whether an event was available. The event (if present) is unilaterally removed from the queue if a valid {@code XrInstance} is provided. On return, the {@code eventData} parameter is filled with the event’s data and the type field is changed to the event’s type. Runtimes may create valid {@code next} chains depending on enabled extensions, but they must guarantee that any such chains point only to objects which fit completely within the original {@link XrEventDataBuffer} pointed to by {@code eventData}.
*
* The runtime must discard queued events which contain destroyed or otherwise invalid handles. The runtime must not return events containing handles that have been destroyed or are otherwise invalid at the time of the call to {@link #xrPollEvent PollEvent}.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code eventData} must be a pointer to an {@link XrEventDataBuffer} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_EVENT_UNAVAILABLE EVENT_UNAVAILABLE}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
*
*
*
* Event Descriptions
*
*
* Event Description
*
* {@link XrEventDataEventsLost} event queue has overflowed and some events were lost
* {@link XrEventDataInstanceLossPending} application is about to lose the instance
* {@link XrEventDataInteractionProfileChanged} current interaction profile for one or more top level user paths has changed
* {@link XrEventDataReferenceSpaceChangePending} runtime will begin operating with updated definitions or bounds for a reference space
* {@link XrEventDataSessionStateChanged} the application’s session has changed lifecycle state
*
*
*
* See Also
*
* {@link XrEventDataBuffer}
*
* @param instance a valid {@code XrInstance}.
* @param eventData a pointer to a valid {@link XrEventDataBuffer}.
*/
@NativeType("XrResult")
public static int xrPollEvent(XrInstance instance, @NativeType("XrEventDataBuffer *") XrEventDataBuffer eventData) {
return nxrPollEvent(instance, eventData.address());
}
// --- [ xrResultToString ] ---
/** Unsafe version of: {@link #xrResultToString ResultToString} */
public static int nxrResultToString(XrInstance instance, int value, long buffer) {
long __functionAddress = instance.getCapabilities().xrResultToString;
return callPPI(instance.address(), value, buffer, __functionAddress);
}
/**
* Converts an XrResult to a UTF-8 string.
*
* C Specification
*
*
* XrResult xrResultToString(
* XrInstance instance,
* XrResult value,
* char buffer[XR_MAX_RESULT_STRING_SIZE]);
*
* Description
*
* Returns the text version of the provided {@code XrResult} value as a UTF-8 string.
*
* In all cases the returned string must be one of:
*
* Result String Return Values
*
*
* - The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value 0 results in the string {@code XR_SUCCESS})
* - {@code XR_UNKNOWN_SUCCESS_} concatenated with the positive result number expressed as a decimal number.
* - {@code XR_UNKNOWN_FAILURE_} concatenated with the negative result number expressed as a decimal number.
*
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code value} must be a valid {@code XrResult} value
* - {@code buffer} must be a character array of length {@link #XR_MAX_RESULT_STRING_SIZE MAX_RESULT_STRING_SIZE}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
*
*
*
* See Also
*
* {@link #xrStructureTypeToString StructureTypeToString}
*
* @param instance the handle of the instance to ask for the string.
* @param value the {@code XrResult} value to turn into a string.
* @param buffer the buffer that will be used to return the string in.
*/
@NativeType("XrResult")
public static int xrResultToString(XrInstance instance, @NativeType("XrResult") int value, @NativeType("char *") ByteBuffer buffer) {
if (CHECKS) {
check(buffer, XR_MAX_RESULT_STRING_SIZE);
}
return nxrResultToString(instance, value, memAddress(buffer));
}
// --- [ xrStructureTypeToString ] ---
/** Unsafe version of: {@link #xrStructureTypeToString StructureTypeToString} */
public static int nxrStructureTypeToString(XrInstance instance, int value, long buffer) {
long __functionAddress = instance.getCapabilities().xrStructureTypeToString;
return callPPI(instance.address(), value, buffer, __functionAddress);
}
/**
* Converts an XrStructureType to a UTF-8 string.
*
* C Specification
*
* The {@link #xrStructureTypeToString StructureTypeToString} function is defined as:
*
*
* XrResult xrStructureTypeToString(
* XrInstance instance,
* XrStructureType value,
* char buffer[XR_MAX_STRUCTURE_NAME_SIZE]);
*
* Description
*
* Returns the text version of the provided {@code XrStructureType} value as a UTF-8 string.
*
* In all cases the returned string must be one of:
*
* Structure Type String Return Values
*
*
* - The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value of {@link #XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO} results in the string {@link #XR_TYPE_INSTANCE_CREATE_INFO TYPE_INSTANCE_CREATE_INFO})
* - {@code XR_UNKNOWN_STRUCTURE_TYPE_} concatenated with the structure type number expressed as a decimal number.
*
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code value} must be a valid {@code XrStructureType} value
* - {@code buffer} must be a character array of length {@link #XR_MAX_STRUCTURE_NAME_SIZE MAX_STRUCTURE_NAME_SIZE}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
*
*
*
* See Also
*
* {@link #xrResultToString ResultToString}
*
* @param instance the handle of the instance to ask for the string.
* @param value the {@code XrStructureType} value to turn into a string.
* @param buffer the buffer that will be used to return the string in.
*/
@NativeType("XrResult")
public static int xrStructureTypeToString(XrInstance instance, @NativeType("XrStructureType") int value, @NativeType("char *") ByteBuffer buffer) {
if (CHECKS) {
check(buffer, XR_MAX_STRUCTURE_NAME_SIZE);
}
return nxrStructureTypeToString(instance, value, memAddress(buffer));
}
// --- [ xrGetSystem ] ---
/** Unsafe version of: {@link #xrGetSystem GetSystem} */
public static int nxrGetSystem(XrInstance instance, long getInfo, long systemId) {
long __functionAddress = instance.getCapabilities().xrGetSystem;
return callPPPI(instance.address(), getInfo, systemId, __functionAddress);
}
/**
* Gets a system identifier.
*
* C Specification
*
* The {@link #xrGetSystem GetSystem} function is defined as:
*
*
* XrResult xrGetSystem(
* XrInstance instance,
* const XrSystemGetInfo* getInfo,
* XrSystemId* systemId);
*
* Description
*
* To get an {@code XrSystemId}, an application specifies its desired form factor to {@link #xrGetSystem GetSystem} and gets the runtime’s {@code XrSystemId} associated with that configuration.
*
* If the form factor is supported but temporarily unavailable, {@link #xrGetSystem GetSystem} must return {@link #XR_ERROR_FORM_FACTOR_UNAVAILABLE ERROR_FORM_FACTOR_UNAVAILABLE}. A runtime may return {@link #XR_SUCCESS SUCCESS} on a subsequent call for a form factor it previously returned {@link #XR_ERROR_FORM_FACTOR_UNAVAILABLE ERROR_FORM_FACTOR_UNAVAILABLE}. For example, connecting or warming up hardware might cause an unavailable form factor to become available.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code getInfo} must be a pointer to a valid {@link XrSystemGetInfo} structure
* - {@code systemId} must be a pointer to an {@code XrSystemId} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_FORM_FACTOR_UNSUPPORTED ERROR_FORM_FACTOR_UNSUPPORTED}
* - {@link #XR_ERROR_FORM_FACTOR_UNAVAILABLE ERROR_FORM_FACTOR_UNAVAILABLE}
*
*
*
* See Also
*
* {@link #XR_NULL_SYSTEM_ID NULL_SYSTEM_ID}, {@link XrSystemGetInfo}
*
* @param instance the handle of the instance from which to get the information.
* @param getInfo a pointer to an {@link XrSystemGetInfo} structure containing the application’s requests for a system.
* @param systemId the returned {@code XrSystemId}.
*/
@NativeType("XrResult")
public static int xrGetSystem(XrInstance instance, @NativeType("XrSystemGetInfo const *") XrSystemGetInfo getInfo, @NativeType("XrSystemId *") LongBuffer systemId) {
if (CHECKS) {
check(systemId, 1);
}
return nxrGetSystem(instance, getInfo.address(), memAddress(systemId));
}
// --- [ xrGetSystemProperties ] ---
/** Unsafe version of: {@link #xrGetSystemProperties GetSystemProperties} */
public static int nxrGetSystemProperties(XrInstance instance, long systemId, long properties) {
long __functionAddress = instance.getCapabilities().xrGetSystemProperties;
return callPJPI(instance.address(), systemId, properties, __functionAddress);
}
/**
* Gets the properties of a particular system.
*
* C Specification
*
* The {@link #xrGetSystemProperties GetSystemProperties} function is defined as:
*
*
* XrResult xrGetSystemProperties(
* XrInstance instance,
* XrSystemId systemId,
* XrSystemProperties* properties);
*
* Description
*
* An application can call {@link #xrGetSystemProperties GetSystemProperties} to retrieve information about the system such as vendor ID, system name, and graphics and tracking properties.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code properties} must be a pointer to an {@link XrSystemProperties} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
*
*
*
* See Also
*
* {@link XrSystemProperties}
*
* @param instance the instance from which {@code systemId} was retrieved.
* @param systemId the {@code XrSystemId} whose properties will be queried.
* @param properties points to an instance of the {@link XrSystemProperties} structure, that will be filled with returned information.
*/
@NativeType("XrResult")
public static int xrGetSystemProperties(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrSystemProperties *") XrSystemProperties properties) {
return nxrGetSystemProperties(instance, systemId, properties.address());
}
// --- [ xrEnumerateEnvironmentBlendModes ] ---
/**
* Unsafe version of: {@link #xrEnumerateEnvironmentBlendModes EnumerateEnvironmentBlendModes}
*
* @param environmentBlendModeCapacityInput the capacity of the {@code environmentBlendModes} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateEnvironmentBlendModes(XrInstance instance, long systemId, int viewConfigurationType, int environmentBlendModeCapacityInput, long environmentBlendModeCountOutput, long environmentBlendModes) {
long __functionAddress = instance.getCapabilities().xrEnumerateEnvironmentBlendModes;
return callPJPPI(instance.address(), systemId, viewConfigurationType, environmentBlendModeCapacityInput, environmentBlendModeCountOutput, environmentBlendModes, __functionAddress);
}
/**
* Lists environment blend modes.
*
* C Specification
*
* The {@link #xrEnumerateEnvironmentBlendModes EnumerateEnvironmentBlendModes} function is defined as:
*
*
* XrResult xrEnumerateEnvironmentBlendModes(
* XrInstance instance,
* XrSystemId systemId,
* XrViewConfigurationType viewConfigurationType,
* uint32_t environmentBlendModeCapacityInput,
* uint32_t* environmentBlendModeCountOutput,
* XrEnvironmentBlendMode* environmentBlendModes);
*
* Description
*
* Enumerates the set of environment blend modes that this runtime supports for a given view configuration of the system. Environment blend modes should be in order from highest to lowest runtime preference.
*
* Runtimes must always return identical buffer contents from this enumeration for the given {@code systemId} and {@code viewConfigurationType} for the lifetime of the instance.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code viewConfigurationType} must be a valid {@code XrViewConfigurationType} value
* - {@code environmentBlendModeCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code environmentBlendModeCapacityInput} is not 0, {@code environmentBlendModes} must be a pointer to an array of {@code environmentBlendModeCapacityInput} {@code XrEnvironmentBlendMode} values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
*
*
*
* @param instance the instance from which {@code systemId} was retrieved.
* @param systemId the {@code XrSystemId} whose environment blend modes will be enumerated.
* @param viewConfigurationType the {@code XrViewConfigurationType} to enumerate.
* @param environmentBlendModeCountOutput a pointer to the count of {@code environmentBlendModes} written, or a pointer to the required capacity in the case that {@code environmentBlendModeCapacityInput} is insufficient.
* @param environmentBlendModes a pointer to an array of {@code XrEnvironmentBlendMode} values, but can be {@code NULL} if {@code environmentBlendModeCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateEnvironmentBlendModes(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") IntBuffer environmentBlendModeCountOutput, @NativeType("XrEnvironmentBlendMode *") @Nullable IntBuffer environmentBlendModes) {
if (CHECKS) {
check(environmentBlendModeCountOutput, 1);
}
return nxrEnumerateEnvironmentBlendModes(instance, systemId, viewConfigurationType, remainingSafe(environmentBlendModes), memAddress(environmentBlendModeCountOutput), memAddressSafe(environmentBlendModes));
}
// --- [ xrCreateSession ] ---
/** Unsafe version of: {@link #xrCreateSession CreateSession} */
public static int nxrCreateSession(XrInstance instance, long createInfo, long session) {
long __functionAddress = instance.getCapabilities().xrCreateSession;
return callPPPI(instance.address(), createInfo, session, __functionAddress);
}
/**
* Creates an XrSession.
*
* C Specification
*
* The {@link #xrCreateSession CreateSession} function is defined as:
*
*
* XrResult xrCreateSession(
* XrInstance instance,
* const XrSessionCreateInfo* createInfo,
* XrSession* session);
*
* Description
*
* Creates a session using the provided {@code createInfo} and returns a handle to that session. This session is created in the {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} state, and a corresponding {@link XrEventDataSessionStateChanged} event to the {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} state must be generated as the first such event for the new session.
*
* The runtime must return {@link #XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING} ({@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE} may be returned due to legacy behavior) on calls to {@link #xrCreateSession CreateSession} if a function named like {@code xrGet*GraphicsRequirements} has not been called for the same {@code instance} and {@link XrSessionCreateInfo}{@code ::systemId}. (See graphics binding extensions for details.)
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code createInfo} must be a pointer to a valid {@link XrSessionCreateInfo} structure
* - {@code session} must be a pointer to an {@code XrSession} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
* - {@link #XR_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
* - {@link #XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING}
* - {@link #XR_ERROR_GRAPHICS_DEVICE_INVALID ERROR_GRAPHICS_DEVICE_INVALID}
*
*
*
* See Also
*
* {@link XrExtensionProperties}, {@link XrSessionCreateInfo}, {@link #xrBeginSession BeginSession}, {@link #xrDestroySession DestroySession}, {@link #xrEndSession EndSession}
*
* @param instance the instance from which {@link XrSessionCreateInfo}{@code ::systemId} was retrieved.
* @param createInfo a pointer to an {@link XrSessionCreateInfo} structure containing information about how to create the session.
* @param session a pointer to a handle in which the created {@code XrSession} is returned.
*/
@NativeType("XrResult")
public static int xrCreateSession(XrInstance instance, @NativeType("XrSessionCreateInfo const *") XrSessionCreateInfo createInfo, @NativeType("XrSession *") PointerBuffer session) {
if (CHECKS) {
check(session, 1);
}
return nxrCreateSession(instance, createInfo.address(), memAddress(session));
}
// --- [ xrDestroySession ] ---
/**
* Destroys an XrSession.
*
* C Specification
*
* The {@link #xrDestroySession DestroySession} function is defined as.
*
*
* XrResult xrDestroySession(
* XrSession session);
*
* Description
*
* {@code XrSession} handles are destroyed using {@link #xrDestroySession DestroySession}. When an {@code XrSession} is destroyed, all handles that are children of that {@code XrSession} are also destroyed.
*
* The application is responsible for ensuring that it has no calls using {@code session} in progress when the session is destroyed.
*
* {@link #xrDestroySession DestroySession} can be called when the session is in any session state.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
*
*
* Thread Safety
*
*
* - Access to {@code session}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*
* See Also
*
* {@link #xrBeginSession BeginSession}, {@link #xrCreateSession CreateSession}, {@link #xrEndSession EndSession}
*
* @param session the session to destroy.
*/
@NativeType("XrResult")
public static int xrDestroySession(XrSession session) {
long __functionAddress = session.getCapabilities().xrDestroySession;
return callPI(session.address(), __functionAddress);
}
// --- [ xrEnumerateReferenceSpaces ] ---
/**
* Unsafe version of: {@link #xrEnumerateReferenceSpaces EnumerateReferenceSpaces}
*
* @param spaceCapacityInput the capacity of the {@code spaces} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateReferenceSpaces(XrSession session, int spaceCapacityInput, long spaceCountOutput, long spaces) {
long __functionAddress = session.getCapabilities().xrEnumerateReferenceSpaces;
return callPPPI(session.address(), spaceCapacityInput, spaceCountOutput, spaces, __functionAddress);
}
/**
* Enumerate available reference spaces.
*
* C Specification
*
* The {@link #xrEnumerateReferenceSpaces EnumerateReferenceSpaces} function is defined as:
*
*
* XrResult xrEnumerateReferenceSpaces(
* XrSession session,
* uint32_t spaceCapacityInput,
* uint32_t* spaceCountOutput,
* XrReferenceSpaceType* spaces);
*
* Description
*
* Enumerates the set of reference space types that this runtime supports for a given session. Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.
*
* If a session enumerates support for a given reference space type, calls to {@link #xrCreateReferenceSpace CreateReferenceSpace} must succeed for that session, with any transient unavailability of poses expressed later during calls to {@link #xrLocateSpace LocateSpace}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code spaceCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code spaceCapacityInput} is not 0, {@code spaces} must be a pointer to an array of {@code spaceCapacityInput} {@code XrReferenceSpaceType} values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
*
*
*
* @param session a handle to an {@code XrSession} previously created with {@link #xrCreateSession CreateSession}.
* @param spaceCountOutput a pointer to the count of {@code spaces} written, or a pointer to the required capacity in the case that {@code spaceCapacityInput} is insufficient.
* @param spaces a pointer to an application-allocated array that will be filled with the enumerant of each supported reference space. It can be {@code NULL} if {@code spaceCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateReferenceSpaces(XrSession session, @NativeType("uint32_t *") IntBuffer spaceCountOutput, @NativeType("XrReferenceSpaceType *") @Nullable IntBuffer spaces) {
if (CHECKS) {
check(spaceCountOutput, 1);
}
return nxrEnumerateReferenceSpaces(session, remainingSafe(spaces), memAddress(spaceCountOutput), memAddressSafe(spaces));
}
// --- [ xrCreateReferenceSpace ] ---
/** Unsafe version of: {@link #xrCreateReferenceSpace CreateReferenceSpace} */
public static int nxrCreateReferenceSpace(XrSession session, long createInfo, long space) {
long __functionAddress = session.getCapabilities().xrCreateReferenceSpace;
return callPPPI(session.address(), createInfo, space, __functionAddress);
}
/**
* Creates a reference space.
*
* C Specification
*
* The {@link #xrCreateReferenceSpace CreateReferenceSpace} function is defined as:
*
*
* XrResult xrCreateReferenceSpace(
* XrSession session,
* const XrReferenceSpaceCreateInfo* createInfo,
* XrSpace* space);
*
* Description
*
* Creates an {@code XrSpace} handle based on a chosen reference space. Application can provide an {@link XrPosef} to define the position and orientation of the new space’s origin within the natural reference frame of the reference space.
*
* Multiple {@code XrSpace} handles may exist simultaneously, up to some limit imposed by the runtime. The {@code XrSpace} handle must be eventually freed via the {@link #xrDestroySpace DestroySpace} function.
*
* The runtime must return {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED} if the given reference space type is not supported by this {@code session}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code createInfo} must be a pointer to a valid {@link XrReferenceSpaceCreateInfo} structure
* - {@code space} must be a pointer to an {@code XrSpace} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED}
* - {@link #XR_ERROR_POSE_INVALID ERROR_POSE_INVALID}
*
*
*
* See Also
*
* {@link XrReferenceSpaceCreateInfo}, {@link #xrDestroySpace DestroySpace}
*
* @param session a handle to an {@code XrSession} previously created with {@link #xrCreateSession CreateSession}.
* @param createInfo the {@link XrReferenceSpaceCreateInfo} used to specify the space.
* @param space the returned space handle.
*/
@NativeType("XrResult")
public static int xrCreateReferenceSpace(XrSession session, @NativeType("XrReferenceSpaceCreateInfo const *") XrReferenceSpaceCreateInfo createInfo, @NativeType("XrSpace *") PointerBuffer space) {
if (CHECKS) {
check(space, 1);
}
return nxrCreateReferenceSpace(session, createInfo.address(), memAddress(space));
}
// --- [ xrGetReferenceSpaceBoundsRect ] ---
/** Unsafe version of: {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect} */
public static int nxrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, long bounds) {
long __functionAddress = session.getCapabilities().xrGetReferenceSpaceBoundsRect;
return callPPI(session.address(), referenceSpaceType, bounds, __functionAddress);
}
/**
* Gets the bounds rectangle of a reference space.
*
* C Specification
*
* The {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect} function is defined as:
*
*
* XrResult xrGetReferenceSpaceBoundsRect(
* XrSession session,
* XrReferenceSpaceType referenceSpaceType,
* XrExtent2Df* bounds);
*
* Description
*
* XR systems may have limited real world spatial ranges in which users can freely move around while remaining tracked. Applications sometimes wish to query these boundaries and alter application behavior or content placement to ensure the user can complete the experience while remaining within the boundary. Applications can query this information using {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect}.
*
* When called, {@link #xrGetReferenceSpaceBoundsRect GetReferenceSpaceBoundsRect} should return the extents of a rectangle that is clear of obstacles down to the floor, allowing where the user can freely move while remaining tracked, if available for that reference space. The returned extent represents the dimensions of an axis-aligned bounding box where the {@link XrExtent2Df}{@code ::width} and {@link XrExtent2Df}{@code ::height} fields correspond to the X and Z axes of the provided space, with the extents centered at the origin of the space. Not all systems or spaces support boundaries. If a runtime is unable to provide bounds for a given space, {@link #XR_SPACE_BOUNDS_UNAVAILABLE SPACE_BOUNDS_UNAVAILABLE} must be returned and all fields of {@code bounds} must be set to 0.
*
* The returned extents are expressed relative to the natural origin of the provided {@code XrReferenceSpaceType} and must not incorporate any origin offsets specified by the application during calls to {@link #xrCreateReferenceSpace CreateReferenceSpace}.
*
* The runtime must return {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED} if the {@code XrReferenceSpaceType} passed in {@code referenceSpaceType} is not supported by this {@code session}.
*
* When a runtime will begin operating with updated space bounds, the runtime must queue a corresponding {@link XrEventDataReferenceSpaceChangePending} event.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code referenceSpaceType} must be a valid {@code XrReferenceSpaceType} value
* - {@code bounds} must be a pointer to an {@link XrExtent2Df} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_SPACE_BOUNDS_UNAVAILABLE SPACE_BOUNDS_UNAVAILABLE}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_FUNCTION_UNSUPPORTED ERROR_FUNCTION_UNSUPPORTED}
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_REFERENCE_SPACE_UNSUPPORTED ERROR_REFERENCE_SPACE_UNSUPPORTED}
*
*
*
* See Also
*
* {@link XrExtent2Df}, {@link #xrCreateReferenceSpace CreateReferenceSpace}
*
* @param session a handle to an {@code XrSession} previously created with {@link #xrCreateSession CreateSession}.
* @param referenceSpaceType the reference space type whose bounds should be retrieved.
* @param bounds the returned space extents.
*/
@NativeType("XrResult")
public static int xrGetReferenceSpaceBoundsRect(XrSession session, @NativeType("XrReferenceSpaceType") int referenceSpaceType, @NativeType("XrExtent2Df *") XrExtent2Df bounds) {
return nxrGetReferenceSpaceBoundsRect(session, referenceSpaceType, bounds.address());
}
// --- [ xrCreateActionSpace ] ---
/** Unsafe version of: {@link #xrCreateActionSpace CreateActionSpace} */
public static int nxrCreateActionSpace(XrSession session, long createInfo, long space) {
long __functionAddress = session.getCapabilities().xrCreateActionSpace;
if (CHECKS) {
XrActionSpaceCreateInfo.validate(createInfo);
}
return callPPPI(session.address(), createInfo, space, __functionAddress);
}
/**
* Creates a space based on a pose action.
*
* C Specification
*
* The {@link #xrCreateActionSpace CreateActionSpace} function is defined as:
*
*
* XrResult xrCreateActionSpace(
* XrSession session,
* const XrActionSpaceCreateInfo* createInfo,
* XrSpace* space);
*
* Description
*
* Creates an {@code XrSpace} handle based on a chosen pose action. Application can provide an {@link XrPosef} to define the position and orientation of the new space’s origin within the natural reference frame of the action space.
*
* Multiple {@code XrSpace} handles may exist simultaneously, up to some limit imposed by the runtime. The {@code XrSpace} handle must be eventually freed via the {@link #xrDestroySpace DestroySpace} function or by destroying the parent {@code XrSession} handle. See spaces-action-spaces-lifetime for details.
*
* The runtime must return {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH} if the action provided in {@link XrActionSpaceCreateInfo}{@code ::action} is not of type {@link #XR_ACTION_TYPE_POSE_INPUT ACTION_TYPE_POSE_INPUT}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code createInfo} must be a pointer to a valid {@link XrActionSpaceCreateInfo} structure
* - {@code space} must be a pointer to an {@code XrSpace} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_POSE_INVALID ERROR_POSE_INVALID}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
*
*
*
* See Also
*
* {@link XrActionSpaceCreateInfo}, {@link #xrDestroySpace DestroySpace}
*
* @param session the {@code XrSession} to create the action space in.
* @param createInfo the {@link XrActionSpaceCreateInfo} used to specify the space.
* @param space the returned space handle.
*/
@NativeType("XrResult")
public static int xrCreateActionSpace(XrSession session, @NativeType("XrActionSpaceCreateInfo const *") XrActionSpaceCreateInfo createInfo, @NativeType("XrSpace *") PointerBuffer space) {
if (CHECKS) {
check(space, 1);
}
return nxrCreateActionSpace(session, createInfo.address(), memAddress(space));
}
// --- [ xrLocateSpace ] ---
/** Unsafe version of: {@link #xrLocateSpace LocateSpace} */
public static int nxrLocateSpace(XrSpace space, XrSpace baseSpace, long time, long location) {
long __functionAddress = space.getCapabilities().xrLocateSpace;
return callPPJPI(space.address(), baseSpace.address(), time, location, __functionAddress);
}
/**
* Locates a space with reference to another space.
*
* C Specification
*
* {@link #xrLocateSpace LocateSpace} provides the physical location of a space in a base space at a specified time, if currently known by the runtime.
*
*
* XrResult xrLocateSpace(
* XrSpace space,
* XrSpace baseSpace,
* XrTime time,
* XrSpaceLocation* location);
*
* Description
*
* For a {@code time} in the past, the runtime should locate the spaces based on the runtime’s most accurate current understanding of how the world was at that historical time.
*
* For a {@code time} in the future, the runtime should locate the spaces based on the runtime’s most up-to-date prediction of how the world will be at that future time.
*
* The minimum valid range of values for {@code time} are described in Prediction Time Limits. For values of {@code time} outside this range, {@link #xrLocateSpace LocateSpace} may return a location with no position and {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} unset.
*
* Some devices improve their understanding of the world as the device is used. The location returned by {@link #xrLocateSpace LocateSpace} for a given {@code space}, {@code baseSpace} and {@code time} may change over time, even for spaces that track static objects, as one or both spaces adjust their origins.
*
* During tracking loss of {@code space} relative to {@code baseSpace}, runtimes should continue to provide inferred or last-known {@link XrPosef}{@code ::position} and {@link XrPosef}{@code ::orientation} values. These inferred poses can, for example, be based on neck model updates, inertial dead reckoning, or a last-known position, so long as it is still reasonable for the application to use that pose. While a runtime is providing position data, it must continue to set {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} but it can clear {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT} to indicate that the position is inferred or last-known in this way.
*
* If the runtime has not yet observed even a last-known pose for how to locate {@code space} in {@code baseSpace} (e.g. one space is an action space bound to a motion controller that has not yet been detected, or the two spaces are in disconnected fragments of the runtime’s tracked volume), the runtime should return a location with no position and {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} unset.
*
* The runtime must return a location with both {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} and {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT} set when locating {@code space} and {@code baseSpace} if both spaces were created relative to the same entity (e.g. two action spaces for the same action), even if the entity is currently untracked. The location in this case is the difference in the two spaces' application-specified transforms relative to that common entity.
*
* During tracking loss, the runtime should return a location with {@link #XR_SPACE_LOCATION_POSITION_VALID_BIT SPACE_LOCATION_POSITION_VALID_BIT} and {@link #XR_SPACE_LOCATION_ORIENTATION_VALID_BIT SPACE_LOCATION_ORIENTATION_VALID_BIT} set and {@link #XR_SPACE_LOCATION_POSITION_TRACKED_BIT SPACE_LOCATION_POSITION_TRACKED_BIT} and {@link #XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT SPACE_LOCATION_ORIENTATION_TRACKED_BIT} unset for spaces tracking two static entities in the world when their relative pose is known to the runtime. This enables applications to continue to make use of the runtime’s latest knowledge of the world.
*
* If an {@link XrSpaceVelocity} structure is chained to the {@link XrSpaceLocation}{@code ::next} pointer, and the velocity is observed or can be calculated by the runtime, the runtime must fill in the linear velocity of the origin of space within the reference frame of {@code baseSpace} and set the {@link #XR_SPACE_VELOCITY_LINEAR_VALID_BIT SPACE_VELOCITY_LINEAR_VALID_BIT}. Similarly, if an {@link XrSpaceVelocity} structure is chained to the {@link XrSpaceLocation}{@code ::next} pointer, and the angular velocity is observed or can be calculated by the runtime, the runtime must fill in the angular velocity of the origin of space within the reference frame of {@code baseSpace} and set the {@link #XR_SPACE_VELOCITY_ANGULAR_VALID_BIT SPACE_VELOCITY_ANGULAR_VALID_BIT}.
*
* The following example code shows how an application can get both the location and velocity of a space within a base space using the {@link #xrLocateSpace LocateSpace} function by chaining an {@link XrSpaceVelocity} to the {@code next} pointer of {@link XrSpaceLocation} and calling {@link #xrLocateSpace LocateSpace}.
*
*
* XrSpace space; // previously initialized
* XrSpace baseSpace; // previously initialized
* XrTime time; // previously initialized
*
* XrSpaceVelocity velocity {XR_TYPE_SPACE_VELOCITY};
* XrSpaceLocation location {XR_TYPE_SPACE_LOCATION, &velocity};
* xrLocateSpace(space, baseSpace, time, &location);
*
* Valid Usage (Implicit)
*
*
* - {@code space} must be a valid {@code XrSpace} handle
* - {@code baseSpace} must be a valid {@code XrSpace} handle
* - {@code location} must be a pointer to an {@link XrSpaceLocation} structure
* - Both of {@code baseSpace} and {@code space} must have been created, allocated, or retrieved from the same {@code XrSession}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_TIME_INVALID ERROR_TIME_INVALID}
*
*
*
* See Also
*
* {@link XrSpaceLocation}
*
* @param space identifies the target space to locate.
* @param baseSpace identifies the underlying space in which to locate {@code space}.
* @param time the time for which the location should be provided.
* @param location provides the location of {@code space} in {@code baseSpace}.
*/
@NativeType("XrResult")
public static int xrLocateSpace(XrSpace space, XrSpace baseSpace, @NativeType("XrTime") long time, @NativeType("XrSpaceLocation *") XrSpaceLocation location) {
return nxrLocateSpace(space, baseSpace, time, location.address());
}
// --- [ xrDestroySpace ] ---
/**
* Destroys an XrSpace.
*
* C Specification
*
* The {@link #xrDestroySpace DestroySpace} function is defined as:
*
*
* XrResult xrDestroySpace(
* XrSpace space);
*
* Description
*
* {@code XrSpace} handles are destroyed using {@link #xrDestroySpace DestroySpace}. The runtime may still use this space if there are active dependencies (e.g, compositions in progress).
*
* Valid Usage (Implicit)
*
*
* - {@code space} must be a valid {@code XrSpace} handle
*
*
* Thread Safety
*
*
* - Access to {@code space}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*
* See Also
*
* {@link #xrCreateActionSpace CreateActionSpace}, {@link #xrCreateReferenceSpace CreateReferenceSpace}
*
* @param space a handle to an {@code XrSpace} previously created by a function such as {@link #xrCreateReferenceSpace CreateReferenceSpace}.
*/
@NativeType("XrResult")
public static int xrDestroySpace(XrSpace space) {
long __functionAddress = space.getCapabilities().xrDestroySpace;
return callPI(space.address(), __functionAddress);
}
// --- [ xrEnumerateViewConfigurations ] ---
/**
* Unsafe version of: {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations}
*
* @param viewConfigurationTypeCapacityInput the capacity of the {@code viewConfigurationTypes} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateViewConfigurations(XrInstance instance, long systemId, int viewConfigurationTypeCapacityInput, long viewConfigurationTypeCountOutput, long viewConfigurationTypes) {
long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurations;
return callPJPPI(instance.address(), systemId, viewConfigurationTypeCapacityInput, viewConfigurationTypeCountOutput, viewConfigurationTypes, __functionAddress);
}
/**
* Enumerates supported view configurations.
*
* C Specification
*
* The {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations} function is defined as:
*
*
* XrResult xrEnumerateViewConfigurations(
* XrInstance instance,
* XrSystemId systemId,
* uint32_t viewConfigurationTypeCapacityInput,
* uint32_t* viewConfigurationTypeCountOutput,
* XrViewConfigurationType* viewConfigurationTypes);
*
* Description
*
* {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations} enumerates the view configuration types supported by the {@code XrSystemId}. The supported set for that system must not change during the lifetime of its {@code XrInstance}. The returned list of primary view configurations should be in order from what the runtime considered highest to lowest user preference. Thus the first enumerated view configuration type should be the one the runtime prefers the application to use if possible.
*
* Runtimes must always return identical buffer contents from this enumeration for the given {@code systemId} and for the lifetime of the instance.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code viewConfigurationTypeCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code viewConfigurationTypeCapacityInput} is not 0, {@code viewConfigurationTypes} must be a pointer to an array of {@code viewConfigurationTypeCapacityInput} {@code XrViewConfigurationType} values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
*
*
*
* @param instance the instance from which {@code systemId} was retrieved.
* @param systemId the {@code XrSystemId} whose view configurations will be enumerated.
* @param viewConfigurationTypeCountOutput a pointer to the count of {@code viewConfigurationTypes} written, or a pointer to the required capacity in the case that {@code viewConfigurationTypeCapacityInput} is insufficient.
* @param viewConfigurationTypes a pointer to an array of {@code XrViewConfigurationType} values, but can be {@code NULL} if {@code viewConfigurationTypeCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateViewConfigurations(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("uint32_t *") IntBuffer viewConfigurationTypeCountOutput, @NativeType("XrViewConfigurationType *") @Nullable IntBuffer viewConfigurationTypes) {
if (CHECKS) {
check(viewConfigurationTypeCountOutput, 1);
}
return nxrEnumerateViewConfigurations(instance, systemId, remainingSafe(viewConfigurationTypes), memAddress(viewConfigurationTypeCountOutput), memAddressSafe(viewConfigurationTypes));
}
// --- [ xrGetViewConfigurationProperties ] ---
/** Unsafe version of: {@link #xrGetViewConfigurationProperties GetViewConfigurationProperties} */
public static int nxrGetViewConfigurationProperties(XrInstance instance, long systemId, int viewConfigurationType, long configurationProperties) {
long __functionAddress = instance.getCapabilities().xrGetViewConfigurationProperties;
return callPJPI(instance.address(), systemId, viewConfigurationType, configurationProperties, __functionAddress);
}
/**
* Gets information for a view configuration.
*
* C Specification
*
* The {@link #xrGetViewConfigurationProperties GetViewConfigurationProperties} function is defined as:
*
*
* XrResult xrGetViewConfigurationProperties(
* XrInstance instance,
* XrSystemId systemId,
* XrViewConfigurationType viewConfigurationType,
* XrViewConfigurationProperties* configurationProperties);
*
* Description
*
* {@link #xrGetViewConfigurationProperties GetViewConfigurationProperties} queries properties of an individual view configuration. Applications must use one of the supported view configuration types returned by {@link #xrEnumerateViewConfigurations EnumerateViewConfigurations}. If {@code viewConfigurationType} is not supported by this {@code XrInstance} the runtime must return {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code viewConfigurationType} must be a valid {@code XrViewConfigurationType} value
* - {@code configurationProperties} must be a pointer to an {@link XrViewConfigurationProperties} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
*
*
*
* See Also
*
* {@link XrViewConfigurationProperties}
*
* @param instance the instance from which {@code systemId} was retrieved.
* @param systemId the {@code XrSystemId} whose view configuration is being queried.
* @param viewConfigurationType the {@code XrViewConfigurationType} of the configuration to get.
* @param configurationProperties a pointer to view configuration properties to return.
*/
@NativeType("XrResult")
public static int xrGetViewConfigurationProperties(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("XrViewConfigurationProperties *") XrViewConfigurationProperties configurationProperties) {
return nxrGetViewConfigurationProperties(instance, systemId, viewConfigurationType, configurationProperties.address());
}
// --- [ xrEnumerateViewConfigurationViews ] ---
/**
* Unsafe version of: {@link #xrEnumerateViewConfigurationViews EnumerateViewConfigurationViews}
*
* @param viewCapacityInput the capacity of the {@code views} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateViewConfigurationViews(XrInstance instance, long systemId, int viewConfigurationType, int viewCapacityInput, long viewCountOutput, long views) {
long __functionAddress = instance.getCapabilities().xrEnumerateViewConfigurationViews;
return callPJPPI(instance.address(), systemId, viewConfigurationType, viewCapacityInput, viewCountOutput, views, __functionAddress);
}
/**
* Gets view configuration views.
*
* C Specification
*
* The {@link #xrEnumerateViewConfigurationViews EnumerateViewConfigurationViews} function is defined as:
*
*
* XrResult xrEnumerateViewConfigurationViews(
* XrInstance instance,
* XrSystemId systemId,
* XrViewConfigurationType viewConfigurationType,
* uint32_t viewCapacityInput,
* uint32_t* viewCountOutput,
* XrViewConfigurationView* views);
*
* Description
*
* Each {@code XrViewConfigurationType} defines the number of views associated with it. Applications can query more details of each view element using {@link #xrEnumerateViewConfigurationViews EnumerateViewConfigurationViews}. If the supplied {@code viewConfigurationType} is not supported by this {@code XrInstance} and {@code XrSystemId}, the runtime must return {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}.
*
* Runtimes must always return identical buffer contents from this enumeration for the given {@code systemId} and {@code viewConfigurationType} for the lifetime of the instance.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code viewConfigurationType} must be a valid {@code XrViewConfigurationType} value
* - {@code viewCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code viewCapacityInput} is not 0, {@code views} must be a pointer to an array of {@code viewCapacityInput} {@link XrViewConfigurationView} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
* - {@link #XR_ERROR_SYSTEM_INVALID ERROR_SYSTEM_INVALID}
*
*
*
* See Also
*
* {@link XrViewConfigurationView}, {@link #xrGetViewConfigurationProperties GetViewConfigurationProperties}
*
* @param instance the instance from which {@code systemId} was retrieved.
* @param systemId the {@code XrSystemId} whose view configuration is being queried.
* @param viewConfigurationType the {@code XrViewConfigurationType} of the configuration to get.
* @param viewCountOutput a pointer to the count of {@code views} written, or a pointer to the required capacity in the case that {@code viewCapacityInput} is 0.
* @param views a pointer to an array of {@link XrViewConfigurationView} values, but can be {@code NULL} if {@code viewCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateViewConfigurationViews(XrInstance instance, @NativeType("XrSystemId") long systemId, @NativeType("XrViewConfigurationType") int viewConfigurationType, @NativeType("uint32_t *") IntBuffer viewCountOutput, @NativeType("XrViewConfigurationView *") XrViewConfigurationView.@Nullable Buffer views) {
if (CHECKS) {
check(viewCountOutput, 1);
}
return nxrEnumerateViewConfigurationViews(instance, systemId, viewConfigurationType, remainingSafe(views), memAddress(viewCountOutput), memAddressSafe(views));
}
// --- [ xrEnumerateSwapchainFormats ] ---
/**
* Unsafe version of: {@link #xrEnumerateSwapchainFormats EnumerateSwapchainFormats}
*
* @param formatCapacityInput the capacity of the {@code formats}, or 0 to retrieve the required capacity.
*/
public static int nxrEnumerateSwapchainFormats(XrSession session, int formatCapacityInput, long formatCountOutput, long formats) {
long __functionAddress = session.getCapabilities().xrEnumerateSwapchainFormats;
return callPPPI(session.address(), formatCapacityInput, formatCountOutput, formats, __functionAddress);
}
/**
* Enumerates swapchain formats.
*
* C Specification
*
* The {@link #xrEnumerateSwapchainFormats EnumerateSwapchainFormats} function is defined as:
*
*
* XrResult xrEnumerateSwapchainFormats(
* XrSession session,
* uint32_t formatCapacityInput,
* uint32_t* formatCountOutput,
* int64_t* formats);
*
* Description
*
* {@link #xrEnumerateSwapchainFormats EnumerateSwapchainFormats} enumerates the texture formats supported by the current session. The type of formats returned are dependent on the graphics API specified in {@link #xrCreateSession CreateSession}. For example, if a DirectX graphics API was specified, then the enumerated formats correspond to the DXGI formats, such as {@code DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}. Texture formats should be in order from highest to lowest runtime preference. The application should use the highest preference format that it supports for optimal performance and quality.
*
* With an OpenGL-based graphics API, the texture formats correspond to OpenGL internal formats.
*
* Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code formatCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code formatCapacityInput} is not 0, {@code formats} must be a pointer to an array of {@code formatCapacityInput} {@code int64_t} values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
*
*
*
* See Also
*
* {@link #xrCreateSwapchain CreateSwapchain}
*
* @param session the session that enumerates the supported formats.
* @param formatCountOutput a pointer to the count of {@code uint64_t} formats written, or a pointer to the required capacity in the case that {@code formatCapacityInput} is insufficient.
* @param formats a pointer to an array of {@code int64_t} format ids, but can be {@code NULL} if {@code formatCapacityInput} is 0. The format ids are specific to the specified graphics API.
*/
@NativeType("XrResult")
public static int xrEnumerateSwapchainFormats(XrSession session, @NativeType("uint32_t *") IntBuffer formatCountOutput, @NativeType("int64_t *") @Nullable LongBuffer formats) {
if (CHECKS) {
check(formatCountOutput, 1);
}
return nxrEnumerateSwapchainFormats(session, remainingSafe(formats), memAddress(formatCountOutput), memAddressSafe(formats));
}
// --- [ xrCreateSwapchain ] ---
/** Unsafe version of: {@link #xrCreateSwapchain CreateSwapchain} */
public static int nxrCreateSwapchain(XrSession session, long createInfo, long swapchain) {
long __functionAddress = session.getCapabilities().xrCreateSwapchain;
return callPPPI(session.address(), createInfo, swapchain, __functionAddress);
}
/**
* Creates an XrSwapchain.
*
* C Specification
*
* The {@link #xrCreateSwapchain CreateSwapchain} function is defined as:
*
*
* XrResult xrCreateSwapchain(
* XrSession session,
* const XrSwapchainCreateInfo* createInfo,
* XrSwapchain* swapchain);
*
* Description
*
* Creates an {@code XrSwapchain} handle. The returned swapchain handle may be subsequently used in API calls. Multiple {@code XrSwapchain} handles may exist simultaneously, up to some limit imposed by the runtime. The {@code XrSwapchain} handle must be eventually freed via the {@link #xrDestroySwapchain DestroySwapchain} function. The runtime must return {@link #XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED} if the image format specified in the {@link XrSwapchainCreateInfo} is unsupported. The runtime must return {@link #XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED} if any bit of the create or usage flags specified in the {@link XrSwapchainCreateInfo} is unsupported.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code createInfo} must be a pointer to a valid {@link XrSwapchainCreateInfo} structure
* - {@code swapchain} must be a pointer to an {@code XrSwapchain} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED}
* - {@link #XR_ERROR_FEATURE_UNSUPPORTED ERROR_FEATURE_UNSUPPORTED}
*
*
*
* See Also
*
* {@link XrSwapchainCreateInfo}, {@link #xrAcquireSwapchainImage AcquireSwapchainImage}, {@link #xrDestroySwapchain DestroySwapchain}, {@link #xrEnumerateSwapchainFormats EnumerateSwapchainFormats}, {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}, {@link #xrReleaseSwapchainImage ReleaseSwapchainImage}
*
* @param session the session that creates the image.
* @param createInfo a pointer to an {@link XrSwapchainCreateInfo} structure containing parameters to be used to create the image.
* @param swapchain a pointer to a handle in which the created {@code XrSwapchain} is returned.
*/
@NativeType("XrResult")
public static int xrCreateSwapchain(XrSession session, @NativeType("XrSwapchainCreateInfo const *") XrSwapchainCreateInfo createInfo, @NativeType("XrSwapchain *") PointerBuffer swapchain) {
if (CHECKS) {
check(swapchain, 1);
}
return nxrCreateSwapchain(session, createInfo.address(), memAddress(swapchain));
}
// --- [ xrDestroySwapchain ] ---
/**
* Destroys an XrSwapchain.
*
* C Specification
*
* The {@link #xrDestroySwapchain DestroySwapchain} function is defined as:
*
*
* XrResult xrDestroySwapchain(
* XrSwapchain swapchain);
*
* Description
*
* All submitted graphics API commands that refer to {@code swapchain} must have completed execution. Runtimes may continue to utilize swapchain images after {@link #xrDestroySwapchain DestroySwapchain} is called.
*
* Valid Usage (Implicit)
*
*
* - {@code swapchain} must be a valid {@code XrSwapchain} handle
*
*
* Thread Safety
*
*
* - Access to {@code swapchain}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*
* See Also
*
* {@link #xrCreateSwapchain CreateSwapchain}
*
* @param swapchain the swapchain to destroy.
*/
@NativeType("XrResult")
public static int xrDestroySwapchain(XrSwapchain swapchain) {
long __functionAddress = swapchain.getCapabilities().xrDestroySwapchain;
return callPI(swapchain.address(), __functionAddress);
}
// --- [ xrEnumerateSwapchainImages ] ---
/**
* Unsafe version of: {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}
*
* @param imageCapacityInput the capacity of the {@code images} array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateSwapchainImages(XrSwapchain swapchain, int imageCapacityInput, long imageCountOutput, long images) {
long __functionAddress = swapchain.getCapabilities().xrEnumerateSwapchainImages;
return callPPPI(swapchain.address(), imageCapacityInput, imageCountOutput, images, __functionAddress);
}
/**
* Gets images from an XrSwapchain.
*
* C Specification
*
* The {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages} function is defined as:
*
*
* XrResult xrEnumerateSwapchainImages(
* XrSwapchain swapchain,
* uint32_t imageCapacityInput,
* uint32_t* imageCountOutput,
* XrSwapchainImageBaseHeader* images);
*
* Description
*
* Fills an array of graphics API-specific {@code XrSwapchainImage} structures. The resources must be constant and valid for the lifetime of the {@code XrSwapchain}.
*
* Runtimes must always return identical buffer contents from this enumeration for the lifetime of the swapchain.
*
* Note: {@code images} is a pointer to an array of structures of graphics API-specific type, not an array of structure pointers.
*
* The pointer submitted as {@code images} will be treated as an array of the expected graphics API-specific type based on the graphics API used at session creation time. If the {@code type} member of any array element accessed in this way does not match the expected value, the runtime must return {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}.
*
* Note
*
* Under a typical memory model, a runtime must treat the supplied pointer as an opaque blob beginning with {@link XrSwapchainImageBaseHeader}, until after it has verified the {@link XrSwapchainImageBaseHeader}{@code ::type}.
*
*
* Valid Usage (Implicit)
*
*
* - {@code swapchain} must be a valid {@code XrSwapchain} handle
* - {@code imageCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code imageCapacityInput} is not 0, {@code images} must be a pointer to an array of {@code imageCapacityInput} {@link XrSwapchainImageBaseHeader}-based structures. See also: {@link XrSwapchainImageOpenGLKHR}, {@link XrSwapchainImageVulkanKHR}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
*
*
*
* See Also
*
* {@link XrSwapchainImageBaseHeader}, {@link #xrCreateSwapchain CreateSwapchain}
*
* @param swapchain the {@code XrSwapchain} to get images from.
* @param imageCountOutput a pointer to the count of {@code images} written, or a pointer to the required capacity in the case that {@code imageCapacityInput} is insufficient.
* @param images a pointer to an array of graphics API-specific {@code XrSwapchainImage} structures, all of the same type, based on {@link XrSwapchainImageBaseHeader}. It can be {@code NULL} if {@code imageCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateSwapchainImages(XrSwapchain swapchain, @NativeType("uint32_t *") IntBuffer imageCountOutput, @NativeType("XrSwapchainImageBaseHeader *") XrSwapchainImageBaseHeader.@Nullable Buffer images) {
if (CHECKS) {
check(imageCountOutput, 1);
}
return nxrEnumerateSwapchainImages(swapchain, remainingSafe(images), memAddress(imageCountOutput), memAddressSafe(images));
}
// --- [ xrAcquireSwapchainImage ] ---
/** Unsafe version of: {@link #xrAcquireSwapchainImage AcquireSwapchainImage} */
public static int nxrAcquireSwapchainImage(XrSwapchain swapchain, long acquireInfo, long index) {
long __functionAddress = swapchain.getCapabilities().xrAcquireSwapchainImage;
return callPPPI(swapchain.address(), acquireInfo, index, __functionAddress);
}
/**
* Acquire a swapchain image.
*
* C Specification
*
* The {@link #xrAcquireSwapchainImage AcquireSwapchainImage} function is defined as:
*
*
* XrResult xrAcquireSwapchainImage(
* XrSwapchain swapchain,
* const XrSwapchainImageAcquireInfo* acquireInfo,
* uint32_t* index);
*
* Description
*
* Acquires the image corresponding to the {@code index} position in the array returned by {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}. The runtime must return {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} if the next available index has already been acquired and not yet released with {@link #xrReleaseSwapchainImage ReleaseSwapchainImage}. If the {@code swapchain} was created with the {@link #XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT SWAPCHAIN_CREATE_STATIC_IMAGE_BIT} set in {@link XrSwapchainCreateInfo}{@code ::createFlags}, this function must not have been previously called for this swapchain. The runtime must return {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} if a {@code swapchain} created with the {@link #XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT SWAPCHAIN_CREATE_STATIC_IMAGE_BIT} set in {@link XrSwapchainCreateInfo}{@code ::createFlags} and this function has been successfully called previously for this swapchain.
*
* This function only provides the index of the swapchain image, for example for use in recording command buffers. It does not wait for the image to be usable by the application. The application must call {@link #xrWaitSwapchainImage WaitSwapchainImage} for each "acquire" call before submitting graphics commands that write to the image.
*
* Valid Usage (Implicit)
*
*
* - {@code swapchain} must be a valid {@code XrSwapchain} handle
* - If {@code acquireInfo} is not {@code NULL}, {@code acquireInfo} must be a pointer to a valid {@link XrSwapchainImageAcquireInfo} structure
* - {@code index} must be a pointer to a {@code uint32_t} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
*
*
*
* See Also
*
* {@link XrSwapchainImageAcquireInfo}, {@link #xrCreateSwapchain CreateSwapchain}, {@link #xrDestroySwapchain DestroySwapchain}, {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}, {@link #xrReleaseSwapchainImage ReleaseSwapchainImage}, {@link #xrWaitSwapchainImage WaitSwapchainImage}
*
* @param swapchain the swapchain from which to acquire an image.
* @param acquireInfo exists for extensibility purposes, it is {@code NULL} or a pointer to a valid {@link XrSwapchainImageAcquireInfo}.
* @param index the returned image index that has been acquired.
*/
@NativeType("XrResult")
public static int xrAcquireSwapchainImage(XrSwapchain swapchain, @NativeType("XrSwapchainImageAcquireInfo const *") @Nullable XrSwapchainImageAcquireInfo acquireInfo, @NativeType("uint32_t *") IntBuffer index) {
if (CHECKS) {
check(index, 1);
}
return nxrAcquireSwapchainImage(swapchain, memAddressSafe(acquireInfo), memAddress(index));
}
// --- [ xrWaitSwapchainImage ] ---
/** Unsafe version of: {@link #xrWaitSwapchainImage WaitSwapchainImage} */
public static int nxrWaitSwapchainImage(XrSwapchain swapchain, long waitInfo) {
long __functionAddress = swapchain.getCapabilities().xrWaitSwapchainImage;
return callPPI(swapchain.address(), waitInfo, __functionAddress);
}
/**
* Wait for a swapchain image to be available.
*
* C Specification
*
* The {@link #xrWaitSwapchainImage WaitSwapchainImage} function is defined as:
*
*
* XrResult xrWaitSwapchainImage(
* XrSwapchain swapchain,
* const XrSwapchainImageWaitInfo* waitInfo);
*
* Description
*
* Before an application begins writing to a swapchain image, it must first wait on the image, to avoid writing to it before the compositor has finished reading from it. {@link #xrWaitSwapchainImage WaitSwapchainImage} will implicitly wait on the oldest acquired swapchain image which has not yet been successfully waited on. Once a swapchain image has been successfully waited on without timeout, the app must release before waiting on the next acquired swapchain image.
*
* This function may block for longer than the timeout specified in {@link XrSwapchainImageWaitInfo} due to scheduling or contention.
*
* If the timeout expires without the image becoming available for writing, {@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED} must be returned. If {@link #xrWaitSwapchainImage WaitSwapchainImage} returns {@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED}, the next call to {@link #xrWaitSwapchainImage WaitSwapchainImage} will wait on the same image index again until the function succeeds with {@link #XR_SUCCESS SUCCESS}. Note that this is not an error code; {@code XR_SUCCEEDED({@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED})} is {@code true}.
*
* The runtime must eventually relinquish ownership of a swapchain image to the application and must not block indefinitely.
*
* The runtime must return {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} if no image has been acquired by calling {@link #xrAcquireSwapchainImage AcquireSwapchainImage}.
*
* Valid Usage (Implicit)
*
*
* - {@code swapchain} must be a valid {@code XrSwapchain} handle
* - {@code waitInfo} must be a pointer to a valid {@link XrSwapchainImageWaitInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
*
*
*
* See Also
*
* {@link XrSwapchainImageWaitInfo}, {@link #xrAcquireSwapchainImage AcquireSwapchainImage}, {@link #xrCreateSwapchain CreateSwapchain}, {@link #xrDestroySwapchain DestroySwapchain}, {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}, {@link #xrReleaseSwapchainImage ReleaseSwapchainImage}
*
* @param swapchain the swapchain from which to wait for an image.
* @param waitInfo a pointer to an {@link XrSwapchainImageWaitInfo} structure.
*/
@NativeType("XrResult")
public static int xrWaitSwapchainImage(XrSwapchain swapchain, @NativeType("XrSwapchainImageWaitInfo const *") XrSwapchainImageWaitInfo waitInfo) {
return nxrWaitSwapchainImage(swapchain, waitInfo.address());
}
// --- [ xrReleaseSwapchainImage ] ---
/** Unsafe version of: {@link #xrReleaseSwapchainImage ReleaseSwapchainImage} */
public static int nxrReleaseSwapchainImage(XrSwapchain swapchain, long releaseInfo) {
long __functionAddress = swapchain.getCapabilities().xrReleaseSwapchainImage;
return callPPI(swapchain.address(), releaseInfo, __functionAddress);
}
/**
* Release a swapchain image.
*
* C Specification
*
* The {@link #xrReleaseSwapchainImage ReleaseSwapchainImage} function is defined as:
*
*
* XrResult xrReleaseSwapchainImage(
* XrSwapchain swapchain,
* const XrSwapchainImageReleaseInfo* releaseInfo);
*
* Description
*
* If the {@code swapchain} was created with the {@link #XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT SWAPCHAIN_CREATE_STATIC_IMAGE_BIT} set in {@link XrSwapchainCreateInfo}{@code ::createFlags} structure, this function must not have been previously called for this swapchain.
*
* The runtime must return {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} if no image has been waited on by calling {@link #xrWaitSwapchainImage WaitSwapchainImage}.
*
* Valid Usage (Implicit)
*
*
* - {@code swapchain} must be a valid {@code XrSwapchain} handle
* - If {@code releaseInfo} is not {@code NULL}, {@code releaseInfo} must be a pointer to a valid {@link XrSwapchainImageReleaseInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
*
*
*
* See Also
*
* {@link XrSwapchainImageReleaseInfo}, {@link #xrAcquireSwapchainImage AcquireSwapchainImage}, {@link #xrCreateSwapchain CreateSwapchain}, {@link #xrDestroySwapchain DestroySwapchain}, {@link #xrEnumerateSwapchainImages EnumerateSwapchainImages}, {@link #xrWaitSwapchainImage WaitSwapchainImage}
*
* @param swapchain the {@code XrSwapchain} from which to release an image.
* @param releaseInfo exists for extensibility purposes, it is {@code NULL} or a pointer to a valid {@link XrSwapchainImageReleaseInfo}.
*/
@NativeType("XrResult")
public static int xrReleaseSwapchainImage(XrSwapchain swapchain, @NativeType("XrSwapchainImageReleaseInfo const *") @Nullable XrSwapchainImageReleaseInfo releaseInfo) {
return nxrReleaseSwapchainImage(swapchain, memAddressSafe(releaseInfo));
}
// --- [ xrBeginSession ] ---
/** Unsafe version of: {@link #xrBeginSession BeginSession} */
public static int nxrBeginSession(XrSession session, long beginInfo) {
long __functionAddress = session.getCapabilities().xrBeginSession;
return callPPI(session.address(), beginInfo, __functionAddress);
}
/**
* Begins an XrSession.
*
* C Specification
*
* The {@link #xrBeginSession BeginSession} function is defined as:
*
*
* XrResult xrBeginSession(
* XrSession session,
* const XrSessionBeginInfo* beginInfo);
*
* Description
*
* When the application receives {@link XrEventDataSessionStateChanged} event with the {@link #XR_SESSION_STATE_READY SESSION_STATE_READY} state, the application should then call {@link #xrBeginSession BeginSession} to start rendering frames for display to the user.
*
* After this function successfully returns, the session is considered to be running. The application should then start its frame loop consisting of some sequence of {@link #xrWaitFrame WaitFrame}/{@link #xrBeginFrame BeginFrame}/{@link #xrEndFrame EndFrame} calls.
*
* If the session is already running when the application calls {@link #xrBeginSession BeginSession}, the runtime must return error {@link #XR_ERROR_SESSION_RUNNING ERROR_SESSION_RUNNING}. If the session is not running when the application calls {@link #xrBeginSession BeginSession}, but the session is not yet in the {@link #XR_SESSION_STATE_READY SESSION_STATE_READY} state, the runtime must return error {@link #XR_ERROR_SESSION_NOT_READY ERROR_SESSION_NOT_READY}.
*
* Note that a runtime may decide not to show the user any given frame from a session at any time, for example if the user has switched to a different application’s running session. The application should check whether {@link #xrWaitFrame WaitFrame} returns {@link XrFrameState}{@code ::shouldRender} set to true before rendering a given frame to determine whether that frame will be visible to the user.
*
* Runtime session frame state must start in a reset state when a session transitions to running so that no state is carried over from when the same session was previously running. Frame state in this context includes {@link #xrWaitFrame WaitFrame}, {@link #xrBeginFrame BeginFrame}, and {@link #xrEndFrame EndFrame} call order enforcement.
*
* If {@link XrSessionBeginInfo}{@code ::primaryViewConfigurationType} in {@code beginInfo} is not supported by the {@code XrSystemId} used to create the {@code session}, the runtime must return {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code beginInfo} must be a pointer to a valid {@link XrSessionBeginInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
* - {@link #XR_ERROR_SESSION_RUNNING ERROR_SESSION_RUNNING}
* - {@link #XR_ERROR_SESSION_NOT_READY ERROR_SESSION_NOT_READY}
*
*
*
* See Also
*
* {@link XrSessionBeginInfo}, {@link #xrCreateSession CreateSession}, {@link #xrDestroySession DestroySession}, {@link #xrEndSession EndSession}
*
* @param session a valid {@code XrSession} handle.
* @param beginInfo a pointer to an {@link XrSessionBeginInfo} structure.
*/
@NativeType("XrResult")
public static int xrBeginSession(XrSession session, @NativeType("XrSessionBeginInfo const *") XrSessionBeginInfo beginInfo) {
return nxrBeginSession(session, beginInfo.address());
}
// --- [ xrEndSession ] ---
/**
* Ends an XrSession.
*
* C Specification
*
* The {@link #xrEndSession EndSession} function is defined as:
*
*
* XrResult xrEndSession(
* XrSession session);
*
* Description
*
* When the application receives {@link XrEventDataSessionStateChanged} event with the {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} state, the application should stop its frame loop and then call {@link #xrEndSession EndSession} to end the running session. This function signals to the runtime that the application will no longer call {@link #xrWaitFrame WaitFrame}, {@link #xrBeginFrame BeginFrame} or {@link #xrEndFrame EndFrame} from any thread allowing the runtime to safely transition the session to {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE}. The application must also avoid reading input state or sending haptic output after calling {@link #xrEndSession EndSession}.
*
* If the session is not running when the application calls {@link #xrEndSession EndSession}, the runtime must return error {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}. If the session is still running when the application calls {@link #xrEndSession EndSession}, but the session is not yet in the {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} state, the runtime must return error {@link #XR_ERROR_SESSION_NOT_STOPPING ERROR_SESSION_NOT_STOPPING}.
*
* If the application wishes to exit a running session, the application can call {@link #xrRequestExitSession RequestExitSession} so that the session transitions from {@link #XR_SESSION_STATE_IDLE SESSION_STATE_IDLE} to {@link #XR_SESSION_STATE_EXITING SESSION_STATE_EXITING}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SESSION_NOT_STOPPING ERROR_SESSION_NOT_STOPPING}
* - {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
*
*
*
* See Also
*
* {@link #xrBeginSession BeginSession}, {@link #xrCreateSession CreateSession}, {@link #xrDestroySession DestroySession}
*
* @param session a handle to a running {@code XrSession}.
*/
@NativeType("XrResult")
public static int xrEndSession(XrSession session) {
long __functionAddress = session.getCapabilities().xrEndSession;
return callPI(session.address(), __functionAddress);
}
// --- [ xrRequestExitSession ] ---
/**
* Request to exit a running session.
*
* C Specification
*
* When an application wishes to exit a running session, it can call {@link #xrRequestExitSession RequestExitSession}, requesting that the runtime transition through the various intermediate session states including {@link #XR_SESSION_STATE_STOPPING SESSION_STATE_STOPPING} to {@link #XR_SESSION_STATE_EXITING SESSION_STATE_EXITING}.
*
* On platforms where an application’s lifecycle is managed by the system, session state changes may be implicitly triggered by application lifecycle state changes. On such platforms, using platform-specific methods to alter application lifecycle state may be the preferred method of provoking session state changes. The behavior of {@link #xrRequestExitSession RequestExitSession} is not altered, however explicit session exit may not interact with the platform-specific application lifecycle.
*
* The {@link #xrRequestExitSession RequestExitSession} function is defined as:
*
*
* XrResult xrRequestExitSession(
* XrSession session);
*
* Description
*
* If {@code session} is not running when {@link #xrRequestExitSession RequestExitSession} is called, {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING} must be returned.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
*
*
*
* See Also
*
* {@link #xrDestroySession DestroySession}, {@link #xrEndSession EndSession}
*
* @param session a handle to a running {@code XrSession}.
*/
@NativeType("XrResult")
public static int xrRequestExitSession(XrSession session) {
long __functionAddress = session.getCapabilities().xrRequestExitSession;
return callPI(session.address(), __functionAddress);
}
// --- [ xrWaitFrame ] ---
/** Unsafe version of: {@link #xrWaitFrame WaitFrame} */
public static int nxrWaitFrame(XrSession session, long frameWaitInfo, long frameState) {
long __functionAddress = session.getCapabilities().xrWaitFrame;
return callPPPI(session.address(), frameWaitInfo, frameState, __functionAddress);
}
/**
* Frame timing function.
*
* C Specification
*
* The {@link #xrWaitFrame WaitFrame} function is defined as:
*
*
* XrResult xrWaitFrame(
* XrSession session,
* const XrFrameWaitInfo* frameWaitInfo,
* XrFrameState* frameState);
*
* Description
*
* {@link #xrWaitFrame WaitFrame} throttles the application frame loop in order to synchronize application frame submissions with the display. {@link #xrWaitFrame WaitFrame} returns a predicted display time for the next time that the runtime predicts a composited frame will be displayed. The runtime may affect this computation by changing the return values and throttling of {@link #xrWaitFrame WaitFrame} in response to feedback from frame submission and completion times in {@link #xrEndFrame EndFrame}. A subsequent {@link #xrWaitFrame WaitFrame} call must block until the previous frame has been begun with {@link #xrBeginFrame BeginFrame} and must unblock independently of the corresponding call to {@link #xrEndFrame EndFrame}. Refer to {@link #xrBeginSession BeginSession} for details on how a transition to session running resets the frame function call order.
*
* When less than one frame interval has passed since the previous return from {@link #xrWaitFrame WaitFrame}, the runtime should block until the beginning of the next frame interval. If more than one frame interval has passed since the last return from {@link #xrWaitFrame WaitFrame}, the runtime may return immediately or block until the beginning of the next frame interval.
*
* In the case that an application has pipelined frame submissions, the application should compute the appropriate target display time using both the predicted display time and predicted display interval. The application should use the computed target display time when requesting space and view locations for rendering.
*
* The {@link XrFrameState}{@code ::predictedDisplayTime} returned by {@link #xrWaitFrame WaitFrame} must be monotonically increasing.
*
* The runtime may dynamically adjust the start time of the frame interval relative to the display hardware’s refresh cycle to minimize graphics processor contention between the application and the compositor.
*
* {@link #xrWaitFrame WaitFrame} must be callable from any thread, including a different thread than {@link #xrBeginFrame BeginFrame}/{@link #xrEndFrame EndFrame} are being called from.
*
* Calling {@link #xrWaitFrame WaitFrame} must be externally synchronized by the application, concurrent calls may result in undefined behavior.
*
* The runtime must return {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING} if the {@code session} is not running.
*
* Note
*
* The engine simulation should advance based on the display time. Every stage in the engine pipeline should use the exact same display time for one particular application-generated frame. An accurate and consistent display time across all stages and threads in the engine pipeline is important to avoid object motion judder. If the application has multiple pipeline stages, the application should pass its computed display time through its pipeline, as {@link #xrWaitFrame WaitFrame} must be called only once per frame.
*
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - If {@code frameWaitInfo} is not {@code NULL}, {@code frameWaitInfo} must be a pointer to a valid {@link XrFrameWaitInfo} structure
* - {@code frameState} must be a pointer to an {@link XrFrameState} structure
*
*
* Thread Safety
*
*
* - Access to the {@code session} parameter by any other {@link #xrWaitFrame WaitFrame} call must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
*
*
*
* See Also
*
* {@link XrFrameState}, {@link XrFrameWaitInfo}, {@link #xrBeginFrame BeginFrame}, {@link #xrEndFrame EndFrame}
*
* @param session a valid {@code XrSession} handle.
* @param frameWaitInfo exists for extensibility purposes, it is {@code NULL} or a pointer to a valid {@link XrFrameWaitInfo}.
* @param frameState a pointer to a valid {@link XrFrameState}, an output parameter.
*/
@NativeType("XrResult")
public static int xrWaitFrame(XrSession session, @NativeType("XrFrameWaitInfo const *") @Nullable XrFrameWaitInfo frameWaitInfo, @NativeType("XrFrameState *") XrFrameState frameState) {
return nxrWaitFrame(session, memAddressSafe(frameWaitInfo), frameState.address());
}
// --- [ xrBeginFrame ] ---
/** Unsafe version of: {@link #xrBeginFrame BeginFrame} */
public static int nxrBeginFrame(XrSession session, long frameBeginInfo) {
long __functionAddress = session.getCapabilities().xrBeginFrame;
return callPPI(session.address(), frameBeginInfo, __functionAddress);
}
/**
* Marks a frame.
*
* C Specification
*
* The {@link #xrBeginFrame BeginFrame} function is defined as:
*
*
* XrResult xrBeginFrame(
* XrSession session,
* const XrFrameBeginInfo* frameBeginInfo);
*
* Description
*
* {@link #xrBeginFrame BeginFrame} is called prior to the start of frame rendering. The application should still call {@link #xrBeginFrame BeginFrame} but omit rendering work for the frame if {@link XrFrameState}{@code ::shouldRender} is {@link #XR_FALSE FALSE}.
*
* Runtimes must not perform frame synchronization or throttling through the {@link #xrBeginFrame BeginFrame} function and should instead do so through {@link #xrWaitFrame WaitFrame}.
*
* The runtime must return the error code {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} if there was no corresponding successful call to {@link #xrWaitFrame WaitFrame}. The runtime must return the success code {@link #XR_FRAME_DISCARDED FRAME_DISCARDED} if a prior {@link #xrBeginFrame BeginFrame} has been called without an intervening call to {@link #xrEndFrame EndFrame}. Refer to {@link #xrBeginSession BeginSession} for details on how a transition to session running resets the frame function call order.
*
* The runtime must return {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING} if the {@code session} is not running.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - If {@code frameBeginInfo} is not {@code NULL}, {@code frameBeginInfo} must be a pointer to a valid {@link XrFrameBeginInfo} structure
*
*
* Thread Safety
*
*
* - Access to the {@code session} parameter by any other {@link #xrBeginFrame BeginFrame} or {@link #xrEndFrame EndFrame} call must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_FRAME_DISCARDED FRAME_DISCARDED}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
* - {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
*
*
*
* See Also
*
* {@link XrFrameBeginInfo}, {@link #xrEndFrame EndFrame}, {@link #xrWaitFrame WaitFrame}
*
* @param session a valid {@code XrSession} handle.
* @param frameBeginInfo exists for extensibility purposes, it is {@code NULL} or a pointer to a valid {@link XrFrameBeginInfo}.
*/
@NativeType("XrResult")
public static int xrBeginFrame(XrSession session, @NativeType("XrFrameBeginInfo const *") @Nullable XrFrameBeginInfo frameBeginInfo) {
return nxrBeginFrame(session, memAddressSafe(frameBeginInfo));
}
// --- [ xrEndFrame ] ---
/** Unsafe version of: {@link #xrEndFrame EndFrame} */
public static int nxrEndFrame(XrSession session, long frameEndInfo) {
long __functionAddress = session.getCapabilities().xrEndFrame;
return callPPI(session.address(), frameEndInfo, __functionAddress);
}
/**
* Marks a frame.
*
* C Specification
*
* The {@link #xrEndFrame EndFrame} function is defined as:
*
*
* XrResult xrEndFrame(
* XrSession session,
* const XrFrameEndInfo* frameEndInfo);
*
* Description
*
* {@link #xrEndFrame EndFrame} may return immediately to the application. {@link XrFrameEndInfo}{@code ::displayTime} should be computed using values returned by {@link #xrWaitFrame WaitFrame}. The runtime should be robust against variations in the timing of calls to {@link #xrWaitFrame WaitFrame}, since a pipelined system may call {@link #xrWaitFrame WaitFrame} on a separate thread from {@link #xrBeginFrame BeginFrame} and {@link #xrEndFrame EndFrame} without any synchronization guarantees.
*
* Note
*
* An accurate predicted display time is very important to avoid black pull-in by reprojection and to reduce motion judder in case the runtime does not implement a translational reprojection. Reprojection should never display images before the display refresh period they were predicted for, even if they are completed early, because this will cause motion judder just the same. In other words, the better the predicted display time, the less latency experienced by the user.
*
*
* Every call to {@link #xrEndFrame EndFrame} must be preceded by a successful call to {@link #xrBeginFrame BeginFrame}. Failure to do so must result in {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID} being returned by {@link #xrEndFrame EndFrame}. Refer to {@link #xrBeginSession BeginSession} for details on how a transition to session running resets the frame function call order. {@link XrFrameEndInfo} may reference swapchains into which the application has rendered for this frame. From each {@code XrSwapchain} only one image index is implicitly referenced per frame, the one corresponding to the last call to {@link #xrReleaseSwapchainImage ReleaseSwapchainImage}. However, a specific swapchain (and by extension a specific swapchain image index) may be referenced in {@link XrFrameEndInfo} multiple times. This can be used for example to render a side by side image into a single swapchain image and referencing it twice with differing image rectangles in different layers.
*
* If no layers are provided then the display must be cleared.
*
* {@link #XR_ERROR_LAYER_INVALID ERROR_LAYER_INVALID} must be returned if an unknown, unsupported layer type, or {@code NULL} pointer is passed as one of the {@link XrFrameEndInfo}::layers.
*
* {@link #XR_ERROR_LAYER_INVALID ERROR_LAYER_INVALID} must be returned if a layer references a swapchain that has no released swapchain image.
*
* {@link #XR_ERROR_LAYER_LIMIT_EXCEEDED ERROR_LAYER_LIMIT_EXCEEDED} must be returned if {@link XrFrameEndInfo}::layerCount exceeds {@link XrSystemGraphicsProperties}::maxLayerCount or if the runtime is unable to composite the specified layers due to resource constraints.
*
* {@link #XR_ERROR_SWAPCHAIN_RECT_INVALID ERROR_SWAPCHAIN_RECT_INVALID} must be returned if {@link XrFrameEndInfo}::layers contains a composition layer which references pixels outside of the associated swapchain image or if negatively sized.
*
* {@link #XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED} must be returned if {@link XrFrameEndInfo}::environmentBlendMode is not supported.
*
* {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING} must be returned if the {@code session} is not running.
*
* Note
*
* Applications should discard frames for which {@link #xrEndFrame EndFrame} returns a recoverable error over attempting to resubmit the frame with different frame parameters to provide a more consistent experience across different runtime implementations.
*
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code frameEndInfo} must be a pointer to a valid {@link XrFrameEndInfo} structure
*
*
* Thread Safety
*
*
* - Access to the {@code session} parameter by any other {@link #xrBeginFrame BeginFrame} or {@link #xrEndFrame EndFrame} call must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_TIME_INVALID ERROR_TIME_INVALID}
* - {@link #XR_ERROR_SWAPCHAIN_RECT_INVALID ERROR_SWAPCHAIN_RECT_INVALID}
* - {@link #XR_ERROR_SESSION_NOT_RUNNING ERROR_SESSION_NOT_RUNNING}
* - {@link #XR_ERROR_POSE_INVALID ERROR_POSE_INVALID}
* - {@link #XR_ERROR_LAYER_LIMIT_EXCEEDED ERROR_LAYER_LIMIT_EXCEEDED}
* - {@link #XR_ERROR_LAYER_INVALID ERROR_LAYER_INVALID}
* - {@link #XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED}
* - {@link #XR_ERROR_CALL_ORDER_INVALID ERROR_CALL_ORDER_INVALID}
*
*
*
* See Also
*
* {@link XrFrameEndInfo}, {@link #xrBeginFrame BeginFrame}, {@link #xrWaitFrame WaitFrame}
*
* @param session a valid {@code XrSession} handle.
* @param frameEndInfo a pointer to a valid {@link XrFrameEndInfo}.
*/
@NativeType("XrResult")
public static int xrEndFrame(XrSession session, @NativeType("XrFrameEndInfo const *") XrFrameEndInfo frameEndInfo) {
return nxrEndFrame(session, frameEndInfo.address());
}
// --- [ xrLocateViews ] ---
/**
* Unsafe version of: {@link #xrLocateViews LocateViews}
*
* @param viewCapacityInput an input parameter which specifies the capacity of the {@code views} array. The required capacity must be same as defined by the corresponding {@code XrViewConfigurationType}.
*/
public static int nxrLocateViews(XrSession session, long viewLocateInfo, long viewState, int viewCapacityInput, long viewCountOutput, long views) {
long __functionAddress = session.getCapabilities().xrLocateViews;
if (CHECKS) {
XrViewLocateInfo.validate(viewLocateInfo);
}
return callPPPPPI(session.address(), viewLocateInfo, viewState, viewCapacityInput, viewCountOutput, views, __functionAddress);
}
/**
* Gets view and projection info.
*
* C Specification
*
* The {@link #xrLocateViews LocateViews} function is defined as:
*
*
* XrResult xrLocateViews(
* XrSession session,
* const XrViewLocateInfo* viewLocateInfo,
* XrViewState* viewState,
* uint32_t viewCapacityInput,
* uint32_t* viewCountOutput,
* XrView* views);
*
* Description
*
* The {@link #xrLocateViews LocateViews} function returns the view and projection info for a particular display time. This time is typically the target display time for a given frame. Repeatedly calling {@link #xrLocateViews LocateViews} with the same time may not necessarily return the same result. Instead the prediction gets increasingly accurate as the function is called closer to the given time for which a prediction is made. This allows an application to get the predicted views as late as possible in its pipeline to get the least amount of latency and prediction error.
*
* {@link #xrLocateViews LocateViews} returns an array of {@link XrView} elements, one for each view of the specified view configuration type, along with an {@link XrViewState} containing additional state data shared across all views. The eye each view corresponds to is statically defined in {@code XrViewConfigurationType} in case the application wants to apply eye-specific rendering traits. The {@link XrViewState} and {@link XrView} member data may change on subsequent calls to {@link #xrLocateViews LocateViews}, and so applications must not assume it to be constant.
*
* If an application gives a {@code viewLocateInfo} with a {@link XrViewLocateInfo}{@code ::viewConfigurationType} that was not passed in the session’s call to {@link #xrBeginSession BeginSession} via the {@link XrSessionBeginInfo}{@code ::primaryViewConfigurationType}, or enabled though an extension, then the runtime must return {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code viewLocateInfo} must be a pointer to a valid {@link XrViewLocateInfo} structure
* - {@code viewState} must be a pointer to an {@link XrViewState} structure
* - {@code viewCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code viewCapacityInput} is not 0, {@code views} must be a pointer to an array of {@code viewCapacityInput} {@link XrView} structures
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED}
* - {@link #XR_ERROR_TIME_INVALID ERROR_TIME_INVALID}
*
*
*
* See Also
*
* {@link XrView}, {@link XrViewLocateInfo}, {@link XrViewState}
*
* @param session a handle to the provided {@code XrSession}.
* @param viewLocateInfo a pointer to a valid {@link XrViewLocateInfo} structure.
* @param viewState the output structure with the viewer state information.
* @param viewCountOutput an output parameter which identifies the valid count of {@code views}.
* @param views an array of {@link XrView}.
*/
@NativeType("XrResult")
public static int xrLocateViews(XrSession session, @NativeType("XrViewLocateInfo const *") XrViewLocateInfo viewLocateInfo, @NativeType("XrViewState *") XrViewState viewState, @NativeType("uint32_t *") IntBuffer viewCountOutput, @NativeType("XrView *") XrView.@Nullable Buffer views) {
if (CHECKS) {
check(viewCountOutput, 1);
}
return nxrLocateViews(session, viewLocateInfo.address(), viewState.address(), remainingSafe(views), memAddress(viewCountOutput), memAddressSafe(views));
}
// --- [ xrStringToPath ] ---
/** Unsafe version of: {@link #xrStringToPath StringToPath} */
public static int nxrStringToPath(XrInstance instance, long pathString, long path) {
long __functionAddress = instance.getCapabilities().xrStringToPath;
return callPPPI(instance.address(), pathString, path, __functionAddress);
}
/**
* Converts a string to a semantic path.
*
* C Specification
*
* The {@link #xrStringToPath StringToPath} function is defined as:
*
*
* XrResult xrStringToPath(
* XrInstance instance,
* const char* pathString,
* XrPath* path);
*
* Description
*
* {@link #xrStringToPath StringToPath} retrieves the {@code XrPath} value for a well-formed path string. If such a value had not yet been assigned by the runtime to the provided path string in this {@code XrInstance}, one must be assigned at this point. All calls to this function with the same {@code XrInstance} and path string must retrieve the same {@code XrPath} value. Upon failure, {@link #xrStringToPath StringToPath} must return an appropriate {@code XrResult}, and may set the output parameter to {@link #XR_NULL_PATH NULL_PATH}. See Path Atom Type for the conditions under which an error may be returned when this function is given a valid {@code XrInstance} and a well-formed path string.
*
* If the runtime’s resources are exhausted and it cannot create the path, a return value of {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED} must be returned. If the application specifies a string that is not a well-formed path string, {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID} must be returned.
*
* A return value of {@link #XR_SUCCESS SUCCESS} from {@link #xrStringToPath StringToPath} may not necessarily imply that the runtime has a component or other source of data that will be accessible through that semantic path. It only means that the path string supplied was well-formed and that the retrieved {@code XrPath} maps to the given path string within and during the lifetime of the {@code XrInstance} given.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code pathString} must be a null-terminated UTF-8 string
* - {@code path} must be a pointer to an {@code XrPath} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID}
* - {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED}
*
*
*
* See Also
*
* {@link #xrPathToString PathToString}
*
* @param instance an instance previously created.
* @param pathString the path name string to retrieve the associated {@code XrPath} for.
* @param path the output parameter, which must point to an {@code XrPath}. Given a well-formed path name string, this will be populated with an opaque value that is constant for that path string during the lifetime of that instance.
*/
@NativeType("XrResult")
public static int xrStringToPath(XrInstance instance, @NativeType("char const *") ByteBuffer pathString, @NativeType("XrPath *") LongBuffer path) {
if (CHECKS) {
checkNT1(pathString);
check(path, 1);
}
return nxrStringToPath(instance, memAddress(pathString), memAddress(path));
}
/**
* Converts a string to a semantic path.
*
* C Specification
*
* The {@link #xrStringToPath StringToPath} function is defined as:
*
*
* XrResult xrStringToPath(
* XrInstance instance,
* const char* pathString,
* XrPath* path);
*
* Description
*
* {@link #xrStringToPath StringToPath} retrieves the {@code XrPath} value for a well-formed path string. If such a value had not yet been assigned by the runtime to the provided path string in this {@code XrInstance}, one must be assigned at this point. All calls to this function with the same {@code XrInstance} and path string must retrieve the same {@code XrPath} value. Upon failure, {@link #xrStringToPath StringToPath} must return an appropriate {@code XrResult}, and may set the output parameter to {@link #XR_NULL_PATH NULL_PATH}. See Path Atom Type for the conditions under which an error may be returned when this function is given a valid {@code XrInstance} and a well-formed path string.
*
* If the runtime’s resources are exhausted and it cannot create the path, a return value of {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED} must be returned. If the application specifies a string that is not a well-formed path string, {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID} must be returned.
*
* A return value of {@link #XR_SUCCESS SUCCESS} from {@link #xrStringToPath StringToPath} may not necessarily imply that the runtime has a component or other source of data that will be accessible through that semantic path. It only means that the path string supplied was well-formed and that the retrieved {@code XrPath} maps to the given path string within and during the lifetime of the {@code XrInstance} given.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code pathString} must be a null-terminated UTF-8 string
* - {@code path} must be a pointer to an {@code XrPath} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID}
* - {@link #XR_ERROR_PATH_COUNT_EXCEEDED ERROR_PATH_COUNT_EXCEEDED}
*
*
*
* See Also
*
* {@link #xrPathToString PathToString}
*
* @param instance an instance previously created.
* @param pathString the path name string to retrieve the associated {@code XrPath} for.
* @param path the output parameter, which must point to an {@code XrPath}. Given a well-formed path name string, this will be populated with an opaque value that is constant for that path string during the lifetime of that instance.
*/
@NativeType("XrResult")
public static int xrStringToPath(XrInstance instance, @NativeType("char const *") CharSequence pathString, @NativeType("XrPath *") LongBuffer path) {
if (CHECKS) {
check(path, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
stack.nUTF8(pathString, true);
long pathStringEncoded = stack.getPointerAddress();
return nxrStringToPath(instance, pathStringEncoded, memAddress(path));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ xrPathToString ] ---
/**
* Unsafe version of: {@link #xrPathToString PathToString}
*
* @param bufferCapacityInput the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrPathToString(XrInstance instance, long path, int bufferCapacityInput, long bufferCountOutput, long buffer) {
long __functionAddress = instance.getCapabilities().xrPathToString;
return callPJPPI(instance.address(), path, bufferCapacityInput, bufferCountOutput, buffer, __functionAddress);
}
/**
* Converts a semantic path to a string.
*
* C Specification
*
*
* XrResult xrPathToString(
* XrInstance instance,
* XrPath path,
* uint32_t bufferCapacityInput,
* uint32_t* bufferCountOutput,
* char* buffer);
*
* Description
*
* {@link #xrPathToString PathToString} retrieves the path name string associated with an {@code XrPath}, in the context of a given {@code XrInstance}, in the form of a {@code NULL} terminated string placed into a caller-allocated buffer. Since the mapping between a well-formed path name string and an {@code XrPath} is bijective, there will always be exactly one string for each valid {@code XrPath} value. This can be useful if the calling application receives an {@code XrPath} value that they had not previously retrieved via {@link #xrStringToPath StringToPath}. During the lifetime of the given {@code XrInstance}, the path name string retrieved by this function for a given valid {@code XrPath} will not change. For invalid paths, including {@link #XR_NULL_PATH NULL_PATH}, {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID} must be returned.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code bufferCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code bufferCapacityInput} is not 0, {@code buffer} must be a pointer to an array of {@code bufferCapacityInput} char values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
*
*
*
* See Also
*
* {@link #xrStringToPath StringToPath}
*
* @param instance an instance previously created.
* @param path the valid {@code XrPath} value to retrieve the path string for.
* @param bufferCountOutput a pointer to the count of characters written to {@code buffer} (including the terminating '\0'), or a pointer to the required capacity in the case that {@code bufferCapacityInput} is insufficient.
* @param buffer a pointer to an application-allocated buffer that will be filled with the semantic path string. It can be {@code NULL} if {@code bufferCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrPathToString(XrInstance instance, @NativeType("XrPath") long path, @NativeType("uint32_t *") IntBuffer bufferCountOutput, @NativeType("char *") @Nullable ByteBuffer buffer) {
if (CHECKS) {
check(bufferCountOutput, 1);
}
return nxrPathToString(instance, path, remainingSafe(buffer), memAddress(bufferCountOutput), memAddressSafe(buffer));
}
// --- [ xrCreateActionSet ] ---
/** Unsafe version of: {@link #xrCreateActionSet CreateActionSet} */
public static int nxrCreateActionSet(XrInstance instance, long createInfo, long actionSet) {
long __functionAddress = instance.getCapabilities().xrCreateActionSet;
return callPPPI(instance.address(), createInfo, actionSet, __functionAddress);
}
/**
* Creates an XrActionSet.
*
* C Specification
*
* The {@link #xrCreateActionSet CreateActionSet} function is defined as:
*
*
* XrResult xrCreateActionSet(
* XrInstance instance,
* const XrActionSetCreateInfo* createInfo,
* XrActionSet* actionSet);
*
* Description
*
* The {@link #xrCreateActionSet CreateActionSet} function creates an action set and returns a handle to the created action set.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code createInfo} must be a pointer to a valid {@link XrActionSetCreateInfo} structure
* - {@code actionSet} must be a pointer to an {@code XrActionSet} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID}
* - {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID}
* - {@link #XR_ERROR_NAME_DUPLICATED ERROR_NAME_DUPLICATED}
* - {@link #XR_ERROR_LOCALIZED_NAME_INVALID ERROR_LOCALIZED_NAME_INVALID}
* - {@link #XR_ERROR_LOCALIZED_NAME_DUPLICATED ERROR_LOCALIZED_NAME_DUPLICATED}
*
*
*
* See Also
*
* {@link XrActionSetCreateInfo}, {@link #xrDestroyActionSet DestroyActionSet}
*
* @param instance a handle to an {@code XrInstance}.
* @param createInfo a pointer to a valid {@link XrActionSetCreateInfo} structure that defines the action set being created.
* @param actionSet a pointer to an {@code XrActionSet} where the created action set is returned.
*/
@NativeType("XrResult")
public static int xrCreateActionSet(XrInstance instance, @NativeType("XrActionSetCreateInfo const *") XrActionSetCreateInfo createInfo, @NativeType("XrActionSet *") PointerBuffer actionSet) {
if (CHECKS) {
check(actionSet, 1);
}
return nxrCreateActionSet(instance, createInfo.address(), memAddress(actionSet));
}
// --- [ xrDestroyActionSet ] ---
/**
* Destroys an XrActionSet.
*
* C Specification
*
* The {@link #xrDestroyActionSet DestroyActionSet} function is defined as:
*
*
* XrResult xrDestroyActionSet(
* XrActionSet actionSet);
*
* Description
*
* Action set handles can be destroyed by calling {@link #xrDestroyActionSet DestroyActionSet}. When an action set handle is destroyed, all handles of actions in that action set are also destroyed.
*
* The implementation must not free underlying resources for the action set while there are other valid handles that refer to those resources. The implementation may release resources for an action set when all of the action spaces for actions in that action set have been destroyed. See Action Spaces Lifetime for details.
*
* Resources for all action sets in an instance must be freed when the instance containing those actions sets is destroyed.
*
* Valid Usage (Implicit)
*
*
* - {@code actionSet} must be a valid {@code XrActionSet} handle
*
*
* Thread Safety
*
*
* - Access to {@code actionSet}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*
* See Also
*
* {@link #xrCreateActionSet CreateActionSet}
*
* @param actionSet the action set to destroy.
*/
@NativeType("XrResult")
public static int xrDestroyActionSet(XrActionSet actionSet) {
long __functionAddress = actionSet.getCapabilities().xrDestroyActionSet;
return callPI(actionSet.address(), __functionAddress);
}
// --- [ xrCreateAction ] ---
/** Unsafe version of: {@link #xrCreateAction CreateAction} */
public static int nxrCreateAction(XrActionSet actionSet, long createInfo, long action) {
long __functionAddress = actionSet.getCapabilities().xrCreateAction;
return callPPPI(actionSet.address(), createInfo, action, __functionAddress);
}
/**
* Creates an XrAction.
*
* C Specification
*
* The {@link #xrCreateAction CreateAction} function is defined as:
*
*
* XrResult xrCreateAction(
* XrActionSet actionSet,
* const XrActionCreateInfo* createInfo,
* XrAction* action);
*
* Description
*
* {@link #xrCreateAction CreateAction} creates an action and returns its handle.
*
* If {@code actionSet} has been included in a call to {@link #xrAttachSessionActionSets AttachSessionActionSets}, the implementation must return {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}.
*
* Valid Usage (Implicit)
*
*
* - {@code actionSet} must be a valid {@code XrActionSet} handle
* - {@code createInfo} must be a pointer to a valid {@link XrActionCreateInfo} structure
* - {@code action} must be a pointer to an {@code XrAction} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_OUT_OF_MEMORY ERROR_OUT_OF_MEMORY}
* - {@link #XR_ERROR_LIMIT_REACHED ERROR_LIMIT_REACHED}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_PATH_FORMAT_INVALID ERROR_PATH_FORMAT_INVALID}
* - {@link #XR_ERROR_NAME_INVALID ERROR_NAME_INVALID}
* - {@link #XR_ERROR_NAME_DUPLICATED ERROR_NAME_DUPLICATED}
* - {@link #XR_ERROR_LOCALIZED_NAME_INVALID ERROR_LOCALIZED_NAME_INVALID}
* - {@link #XR_ERROR_LOCALIZED_NAME_DUPLICATED ERROR_LOCALIZED_NAME_DUPLICATED}
* - {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionCreateInfo}, {@link #xrDestroyAction DestroyAction}
*
* @param actionSet a handle to an {@code XrActionSet}.
* @param createInfo a pointer to a valid {@link XrActionCreateInfo} structure that defines the action being created.
* @param action a pointer to an {@code XrAction} where the created action is returned.
*/
@NativeType("XrResult")
public static int xrCreateAction(XrActionSet actionSet, @NativeType("XrActionCreateInfo const *") XrActionCreateInfo createInfo, @NativeType("XrAction *") PointerBuffer action) {
if (CHECKS) {
check(action, 1);
}
return nxrCreateAction(actionSet, createInfo.address(), memAddress(action));
}
// --- [ xrDestroyAction ] ---
/**
* Destroys an XrAction.
*
* C Specification
*
* The {@link #xrDestroyAction DestroyAction} function is defined as:
*
*
* XrResult xrDestroyAction(
* XrAction action);
*
* Description
*
* Action handles can be destroyed by calling {@link #xrDestroyAction DestroyAction}. Handles for actions that are part of an action set are automatically destroyed when the action set’s handle is destroyed.
*
* The implementation must not destroy the underlying resources for an action when {@link #xrDestroyAction DestroyAction} is called. Those resources are still used to make action spaces locatable and when processing action priority in {@link #xrSyncActions SyncActions}. Destroying the action handle removes the application’s access to these resources, but has no other change on actions.
*
* Resources for all actions in an instance must be freed when the instance containing those actions sets is destroyed.
*
* Valid Usage (Implicit)
*
*
* - {@code action} must be a valid {@code XrAction} handle
*
*
* Thread Safety
*
*
* - Access to {@code action}, and any child handles, must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
*
*
*
* See Also
*
* {@link #xrCreateAction CreateAction}
*
* @param action the action to destroy.
*/
@NativeType("XrResult")
public static int xrDestroyAction(XrAction action) {
long __functionAddress = action.getCapabilities().xrDestroyAction;
return callPI(action.address(), __functionAddress);
}
// --- [ xrSuggestInteractionProfileBindings ] ---
/** Unsafe version of: {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} */
public static int nxrSuggestInteractionProfileBindings(XrInstance instance, long suggestedBindings) {
long __functionAddress = instance.getCapabilities().xrSuggestInteractionProfileBindings;
if (CHECKS) {
XrInteractionProfileSuggestedBinding.validate(suggestedBindings);
}
return callPPI(instance.address(), suggestedBindings, __functionAddress);
}
/**
* Sets the application-suggested bindings for the interaction profile.
*
* C Specification
*
* The {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} function is defined as:
*
*
* XrResult xrSuggestInteractionProfileBindings(
* XrInstance instance,
* const XrInteractionProfileSuggestedBinding* suggestedBindings);
*
* Description
*
* The {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} function provides action bindings for a single interaction profile. The application can call {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} once per interaction profile that it supports.
*
* The application can provide any number of bindings for each action.
*
* If the application successfully calls {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} more than once for an interaction profile, the runtime must discard the previous suggested bindings and replace them with the new suggested bindings for that profile.
*
* If the interaction profile path does not follow the structure defined in Interaction Profiles or suggested bindings contain paths that do not follow the format defined in Input subpaths (further described in {@link XrActionSuggestedBinding}), the runtime must return {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}. If the interaction profile or input source for any of the suggested bindings does not exist in the allowlist defined in Interaction Profile Paths, the runtime must return {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}. A runtime must accept every valid binding in the allowlist though it is free to ignore any of them.
*
* If the action set for any action referenced in the {@code suggestedBindings} parameter has been included in a call to {@link #xrAttachSessionActionSets AttachSessionActionSets}, the implementation must return {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}.
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code XrInstance} handle
* - {@code suggestedBindings} must be a pointer to a valid {@link XrInteractionProfileSuggestedBinding} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}
*
*
*
* See Also
*
* {@link XrInteractionProfileSuggestedBinding}
*
* @param instance the {@code XrInstance} for which the application would like to set suggested bindings
* @param suggestedBindings the {@link XrInteractionProfileSuggestedBinding} that the application would like to set
*/
@NativeType("XrResult")
public static int xrSuggestInteractionProfileBindings(XrInstance instance, @NativeType("XrInteractionProfileSuggestedBinding const *") XrInteractionProfileSuggestedBinding suggestedBindings) {
return nxrSuggestInteractionProfileBindings(instance, suggestedBindings.address());
}
// --- [ xrAttachSessionActionSets ] ---
/** Unsafe version of: {@link #xrAttachSessionActionSets AttachSessionActionSets} */
public static int nxrAttachSessionActionSets(XrSession session, long attachInfo) {
long __functionAddress = session.getCapabilities().xrAttachSessionActionSets;
if (CHECKS) {
XrSessionActionSetsAttachInfo.validate(attachInfo);
}
return callPPI(session.address(), attachInfo, __functionAddress);
}
/**
* Attaches action sets to a given session.
*
* C Specification
*
* The {@link #xrAttachSessionActionSets AttachSessionActionSets} function is defined as:
*
*
* XrResult xrAttachSessionActionSets(
* XrSession session,
* const XrSessionActionSetsAttachInfo* attachInfo);
*
* Description
*
* {@link #xrAttachSessionActionSets AttachSessionActionSets} attaches the {@code XrActionSet} handles in {@link XrSessionActionSetsAttachInfo}{@code ::actionSets} to the {@code session}. Action sets must be attached in order to be synchronized with {@link #xrSyncActions SyncActions}.
*
* When an action set is attached to a session, that action set becomes immutable. See {@link #xrCreateAction CreateAction} and {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} for details.
*
* After action sets are attached to a session, if any unattached actions are passed to functions for the same session, then for those functions the runtime must return {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}.
*
* The runtime must return {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED} if {@link #xrAttachSessionActionSets AttachSessionActionSets} is called more than once for a given {@code session}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code attachInfo} must be a pointer to a valid {@link XrSessionActionSetsAttachInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_ACTIONSETS_ALREADY_ATTACHED ERROR_ACTIONSETS_ALREADY_ATTACHED}
*
*
*
* See Also
*
* {@link XrSessionActionSetsAttachInfo}
*
* @param session the {@code XrSession} to attach the action sets to.
* @param attachInfo the {@link XrSessionActionSetsAttachInfo} to provide information to attach action sets to the session.
*/
@NativeType("XrResult")
public static int xrAttachSessionActionSets(XrSession session, @NativeType("XrSessionActionSetsAttachInfo const *") XrSessionActionSetsAttachInfo attachInfo) {
return nxrAttachSessionActionSets(session, attachInfo.address());
}
// --- [ xrGetCurrentInteractionProfile ] ---
/** Unsafe version of: {@link #xrGetCurrentInteractionProfile GetCurrentInteractionProfile} */
public static int nxrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, long interactionProfile) {
long __functionAddress = session.getCapabilities().xrGetCurrentInteractionProfile;
return callPJPI(session.address(), topLevelUserPath, interactionProfile, __functionAddress);
}
/**
* Gets the current interaction profile for a top level user paths.
*
* C Specification
*
* The {@link #xrGetCurrentInteractionProfile GetCurrentInteractionProfile} function is defined as:
*
*
* XrResult xrGetCurrentInteractionProfile(
* XrSession session,
* XrPath topLevelUserPath,
* XrInteractionProfileState* interactionProfile);
*
* Description
*
* {@link #xrGetCurrentInteractionProfile GetCurrentInteractionProfile} retrieves the current interaction profile for a top level user path.
*
* The runtime must return only interaction profiles for which the application has provided suggested bindings with {@link #xrSuggestInteractionProfileBindings SuggestInteractionProfileBindings} or {@link #XR_NULL_PATH NULL_PATH}. The runtime may return interaction profiles that do not represent physically present hardware, for example if the runtime is using a known interaction profile to bind to hardware that the application is not aware of. The runtime may return the last-known interaction profile in the event that no controllers are active.
*
* If {@link #xrAttachSessionActionSets AttachSessionActionSets} has not yet been called for the {@code session}, the runtime must return {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}. If {@code topLevelUserPath} is not one of the top level user paths described in /user paths, the runtime must return {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code interactionProfile} must be a pointer to an {@link XrInteractionProfileState} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrInteractionProfileState}
*
* @param session the {@code XrSession} for which the application would like to retrieve the current interaction profile.
* @param topLevelUserPath the top level user path the application would like to retrieve the interaction profile for.
* @param interactionProfile a pointer to an {@link XrInteractionProfileState} structure to receive the current interaction profile.
*/
@NativeType("XrResult")
public static int xrGetCurrentInteractionProfile(XrSession session, @NativeType("XrPath") long topLevelUserPath, @NativeType("XrInteractionProfileState *") XrInteractionProfileState interactionProfile) {
return nxrGetCurrentInteractionProfile(session, topLevelUserPath, interactionProfile.address());
}
// --- [ xrGetActionStateBoolean ] ---
/** Unsafe version of: {@link #xrGetActionStateBoolean GetActionStateBoolean} */
public static int nxrGetActionStateBoolean(XrSession session, long getInfo, long state) {
long __functionAddress = session.getCapabilities().xrGetActionStateBoolean;
if (CHECKS) {
XrActionStateGetInfo.validate(getInfo);
}
return callPPPI(session.address(), getInfo, state, __functionAddress);
}
/**
* Gets boolean action state.
*
* C Specification
*
* {@link #xrGetActionStateBoolean GetActionStateBoolean} retrieves the current state of a boolean action. It is defined as:
*
*
* XrResult xrGetActionStateBoolean(
* XrSession session,
* const XrActionStateGetInfo* getInfo,
* XrActionStateBoolean* state);
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code getInfo} must be a pointer to a valid {@link XrActionStateGetInfo} structure
* - {@code state} must be a pointer to an {@link XrActionStateBoolean} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionStateBoolean}, {@link XrActionStateGetInfo}, {@link #xrCreateAction CreateAction}
*
* @param session the {@code XrSession} to query.
* @param getInfo a pointer to {@link XrActionStateGetInfo} to provide action and subaction paths information.
* @param state a pointer to a valid {@link XrActionStateBoolean} into which the state will be placed.
*/
@NativeType("XrResult")
public static int xrGetActionStateBoolean(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateBoolean *") XrActionStateBoolean state) {
return nxrGetActionStateBoolean(session, getInfo.address(), state.address());
}
// --- [ xrGetActionStateFloat ] ---
/** Unsafe version of: {@link #xrGetActionStateFloat GetActionStateFloat} */
public static int nxrGetActionStateFloat(XrSession session, long getInfo, long state) {
long __functionAddress = session.getCapabilities().xrGetActionStateFloat;
if (CHECKS) {
XrActionStateGetInfo.validate(getInfo);
}
return callPPPI(session.address(), getInfo, state, __functionAddress);
}
/**
* Gets a floating point action state.
*
* C Specification
*
* {@link #xrGetActionStateFloat GetActionStateFloat} retrieves the current state of a floating-point action. It is defined as:
*
*
* XrResult xrGetActionStateFloat(
* XrSession session,
* const XrActionStateGetInfo* getInfo,
* XrActionStateFloat* state);
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code getInfo} must be a pointer to a valid {@link XrActionStateGetInfo} structure
* - {@code state} must be a pointer to an {@link XrActionStateFloat} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionStateFloat}, {@link XrActionStateGetInfo}, {@link #xrCreateAction CreateAction}
*
* @param session the {@code XrSession} to query.
* @param getInfo a pointer to {@link XrActionStateGetInfo} to provide action and subaction paths information.
* @param state a pointer to a valid {@link XrActionStateFloat} into which the state will be placed.
*/
@NativeType("XrResult")
public static int xrGetActionStateFloat(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateFloat *") XrActionStateFloat state) {
return nxrGetActionStateFloat(session, getInfo.address(), state.address());
}
// --- [ xrGetActionStateVector2f ] ---
/** Unsafe version of: {@link #xrGetActionStateVector2f GetActionStateVector2f} */
public static int nxrGetActionStateVector2f(XrSession session, long getInfo, long state) {
long __functionAddress = session.getCapabilities().xrGetActionStateVector2f;
if (CHECKS) {
XrActionStateGetInfo.validate(getInfo);
}
return callPPPI(session.address(), getInfo, state, __functionAddress);
}
/**
* Gets 2D float vector action state.
*
* C Specification
*
* {@link #xrGetActionStateVector2f GetActionStateVector2f} retrieves the current state of a two-dimensional vector action. It is defined as:
*
*
* XrResult xrGetActionStateVector2f(
* XrSession session,
* const XrActionStateGetInfo* getInfo,
* XrActionStateVector2f* state);
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code getInfo} must be a pointer to a valid {@link XrActionStateGetInfo} structure
* - {@code state} must be a pointer to an {@link XrActionStateVector2f} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionStateGetInfo}, {@link XrActionStateVector2f}, {@link #xrCreateAction CreateAction}
*
* @param session the {@code XrSession} to query.
* @param getInfo a pointer to {@link XrActionStateGetInfo} to provide action and subaction paths information.
* @param state a pointer to a valid {@link XrActionStateVector2f} into which the state will be placed.
*/
@NativeType("XrResult")
public static int xrGetActionStateVector2f(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStateVector2f *") XrActionStateVector2f state) {
return nxrGetActionStateVector2f(session, getInfo.address(), state.address());
}
// --- [ xrGetActionStatePose ] ---
/** Unsafe version of: {@link #xrGetActionStatePose GetActionStatePose} */
public static int nxrGetActionStatePose(XrSession session, long getInfo, long state) {
long __functionAddress = session.getCapabilities().xrGetActionStatePose;
if (CHECKS) {
XrActionStateGetInfo.validate(getInfo);
}
return callPPPI(session.address(), getInfo, state, __functionAddress);
}
/**
* Gets metadata from a pose action.
*
* C Specification
*
* The {@link #xrGetActionStatePose GetActionStatePose} function is defined as:
*
*
* XrResult xrGetActionStatePose(
* XrSession session,
* const XrActionStateGetInfo* getInfo,
* XrActionStatePose* state);
*
* Description
*
* {@link #xrGetActionStatePose GetActionStatePose} returns information about the binding and active state for the specified action. To determine the pose of this action at a historical or predicted time, the application can create an action space using {@link #xrCreateActionSpace CreateActionSpace}. Then, after each sync, the application can locate the pose of this action space within a base space using {@link #xrLocateSpace LocateSpace}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code getInfo} must be a pointer to a valid {@link XrActionStateGetInfo} structure
* - {@code state} must be a pointer to an {@link XrActionStatePose} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionStateGetInfo}, {@link XrActionStatePose}, {@link #xrCreateAction CreateAction}, {@link #xrCreateActionSpace CreateActionSpace}
*
* @param session the {@code XrSession} to query.
* @param getInfo a pointer to {@link XrActionStateGetInfo} to provide action and subaction paths information.
* @param state a pointer to a valid {@link XrActionStatePose} into which the state will be placed.
*/
@NativeType("XrResult")
public static int xrGetActionStatePose(XrSession session, @NativeType("XrActionStateGetInfo const *") XrActionStateGetInfo getInfo, @NativeType("XrActionStatePose *") XrActionStatePose state) {
return nxrGetActionStatePose(session, getInfo.address(), state.address());
}
// --- [ xrSyncActions ] ---
/** Unsafe version of: {@link #xrSyncActions SyncActions} */
public static int nxrSyncActions(XrSession session, long syncInfo) {
long __functionAddress = session.getCapabilities().xrSyncActions;
return callPPI(session.address(), syncInfo, __functionAddress);
}
/**
* Updates the current state of input actions.
*
* C Specification
*
* The {@link #xrSyncActions SyncActions} function is defined as:
*
*
* XrResult xrSyncActions(
* XrSession session,
* const XrActionsSyncInfo* syncInfo);
*
* Description
*
* {@link #xrSyncActions SyncActions} updates the current state of input actions. Repeated input action state queries between subsequent synchronization calls must return the same values. The {@code XrActionSet} structures referenced in the {@link XrActionsSyncInfo}{@code ::activeActionSets} must have been previously attached to the session via {@link #xrAttachSessionActionSets AttachSessionActionSets}. If any action sets not attached to this session are passed to {@link #xrSyncActions SyncActions} it must return {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}. Subsets of the bound action sets can be synchronized in order to control which actions are seen as active.
*
* If {@code session} is not focused, the runtime must return {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}, and all action states in the session must be inactive.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code syncInfo} must be a pointer to a valid {@link XrActionsSyncInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrActionsSyncInfo}, {@link XrActiveActionSet}
*
* @param session a handle to the {@code XrSession} that all provided action set handles belong to.
* @param syncInfo an {@link XrActionsSyncInfo} providing information to synchronize action states.
*/
@NativeType("XrResult")
public static int xrSyncActions(XrSession session, @NativeType("XrActionsSyncInfo const *") XrActionsSyncInfo syncInfo) {
return nxrSyncActions(session, syncInfo.address());
}
// --- [ xrEnumerateBoundSourcesForAction ] ---
/**
* Unsafe version of: {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction}
*
* @param sourceCapacityInput the capacity of the array, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrEnumerateBoundSourcesForAction(XrSession session, long enumerateInfo, int sourceCapacityInput, long sourceCountOutput, long sources) {
long __functionAddress = session.getCapabilities().xrEnumerateBoundSourcesForAction;
if (CHECKS) {
XrBoundSourcesForActionEnumerateInfo.validate(enumerateInfo);
}
return callPPPPI(session.address(), enumerateInfo, sourceCapacityInput, sourceCountOutput, sources, __functionAddress);
}
/**
* Queries the bound input sources for an action.
*
* C Specification
*
* The {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction} function is defined as:
*
*
* XrResult xrEnumerateBoundSourcesForAction(
* XrSession session,
* const XrBoundSourcesForActionEnumerateInfo* enumerateInfo,
* uint32_t sourceCapacityInput,
* uint32_t* sourceCountOutput,
* XrPath* sources);
*
* Description
*
* If an action is unbound, {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction} must assign 0 to the value pointed-to by {@code sourceCountOutput} and not modify the array.
*
* {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction} must return {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED} if passed an action in an action set never attached to the session with {@link #xrAttachSessionActionSets AttachSessionActionSets}.
*
* As bindings for actions do not change between calls to {@link #xrSyncActions SyncActions}, {@link #xrEnumerateBoundSourcesForAction EnumerateBoundSourcesForAction} must enumerate the same set of bound sources, or absence of bound sources, for a given query (defined by the {@code enumerateInfo} parameter) between any two calls to {@link #xrSyncActions SyncActions}.
*
* Note
*
* The {@code XrPath} bound sources returned by the runtime are opaque values and should not be inspected or persisted. They are only intended for use in conjunction with {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName}.
*
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code enumerateInfo} must be a pointer to a valid {@link XrBoundSourcesForActionEnumerateInfo} structure
* - {@code sourceCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code sourceCapacityInput} is not 0, {@code sources} must be a pointer to an array of {@code sourceCapacityInput} {@code XrPath} values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrBoundSourcesForActionEnumerateInfo}
*
* @param session the {@code XrSession} being queried.
* @param enumerateInfo an {@link XrBoundSourcesForActionEnumerateInfo} providing the query information.
* @param sourceCountOutput a pointer to the count of {@code sources}, or a pointer to the required capacity in the case that {@code sourceCapacityInput} is insufficient.
* @param sources a pointer to an application-allocated array that will be filled with the {@code XrPath} values for all bound sources. It can be {@code NULL} if {@code sourceCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrEnumerateBoundSourcesForAction(XrSession session, @NativeType("XrBoundSourcesForActionEnumerateInfo const *") XrBoundSourcesForActionEnumerateInfo enumerateInfo, @NativeType("uint32_t *") IntBuffer sourceCountOutput, @NativeType("XrPath *") @Nullable LongBuffer sources) {
if (CHECKS) {
check(sourceCountOutput, 1);
}
return nxrEnumerateBoundSourcesForAction(session, enumerateInfo.address(), remainingSafe(sources), memAddress(sourceCountOutput), memAddressSafe(sources));
}
// --- [ xrGetInputSourceLocalizedName ] ---
/**
* Unsafe version of: {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName}
*
* @param bufferCapacityInput the capacity of the {@code buffer}, or 0 to indicate a request to retrieve the required capacity.
*/
public static int nxrGetInputSourceLocalizedName(XrSession session, long getInfo, int bufferCapacityInput, long bufferCountOutput, long buffer) {
long __functionAddress = session.getCapabilities().xrGetInputSourceLocalizedName;
return callPPPPI(session.address(), getInfo, bufferCapacityInput, bufferCountOutput, buffer, __functionAddress);
}
/**
* Gets a localized source name.
*
* C Specification
*
* The {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName} function is defined as:
*
*
* XrResult xrGetInputSourceLocalizedName(
* XrSession session,
* const XrInputSourceLocalizedNameGetInfo* getInfo,
* uint32_t bufferCapacityInput,
* uint32_t* bufferCountOutput,
* char* buffer);
*
* Description
*
* {@link #xrGetInputSourceLocalizedName GetInputSourceLocalizedName} returns a string for the bound source in the current system locale.
*
* If {@link #xrAttachSessionActionSets AttachSessionActionSets} has not yet been called for the session, the runtime must return {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code getInfo} must be a pointer to a valid {@link XrInputSourceLocalizedNameGetInfo} structure
* - {@code bufferCountOutput} must be a pointer to a {@code uint32_t} value
* - If {@code bufferCapacityInput} is not 0, {@code buffer} must be a pointer to an array of {@code bufferCapacityInput} char values
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_SIZE_INSUFFICIENT ERROR_SIZE_INSUFFICIENT}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrInputSourceLocalizedNameGetInfo}
*
* @param session a handle to the {@code XrSession} associated with the action that reported this bound source.
* @param getInfo an {@link XrInputSourceLocalizedNameGetInfo} providing the query information.
* @param bufferCountOutput a pointer to the count of name characters written to {@code buffer} (including the terminating {@code \0}), or a pointer to the required capacity in the case that {@code bufferCapacityInput} is insufficient.
* @param buffer a pointer to an application-allocated buffer that will be filled with the bound source name. It can be {@code NULL} if {@code bufferCapacityInput} is 0.
*/
@NativeType("XrResult")
public static int xrGetInputSourceLocalizedName(XrSession session, @NativeType("XrInputSourceLocalizedNameGetInfo const *") XrInputSourceLocalizedNameGetInfo getInfo, @NativeType("uint32_t *") IntBuffer bufferCountOutput, @NativeType("char *") @Nullable ByteBuffer buffer) {
if (CHECKS) {
check(bufferCountOutput, 1);
}
return nxrGetInputSourceLocalizedName(session, getInfo.address(), remainingSafe(buffer), memAddress(bufferCountOutput), memAddressSafe(buffer));
}
// --- [ xrApplyHapticFeedback ] ---
/** Unsafe version of: {@link #xrApplyHapticFeedback ApplyHapticFeedback} */
public static int nxrApplyHapticFeedback(XrSession session, long hapticActionInfo, long hapticFeedback) {
long __functionAddress = session.getCapabilities().xrApplyHapticFeedback;
if (CHECKS) {
XrHapticActionInfo.validate(hapticActionInfo);
}
return callPPPI(session.address(), hapticActionInfo, hapticFeedback, __functionAddress);
}
/**
* Apply haptic feedback.
*
* C Specification
*
* The {@link #xrApplyHapticFeedback ApplyHapticFeedback} function is defined as:
*
*
* XrResult xrApplyHapticFeedback(
* XrSession session,
* const XrHapticActionInfo* hapticActionInfo,
* const XrHapticBaseHeader* hapticFeedback);
*
* Description
*
* Triggers a haptic event through the specified action of type {@link #XR_ACTION_TYPE_VIBRATION_OUTPUT ACTION_TYPE_VIBRATION_OUTPUT}. The runtime should deliver this request to the appropriate device, but exactly which device, if any, this event is sent to is up to the runtime to decide. If an appropriate device is unavailable the runtime may ignore this request for haptic feedback.
*
* If {@code session} is not focused, the runtime must return {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}, and not trigger a haptic event.
*
* If another haptic event from this session is currently happening on the device bound to this action, the runtime must interrupt that other event and replace it with the new one.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code hapticActionInfo} must be a pointer to a valid {@link XrHapticActionInfo} structure
* - {@code hapticFeedback} must be a pointer to a valid {@link XrHapticBaseHeader}-based structure. See also: {@link XrHapticAmplitudeEnvelopeVibrationFB}, {@link XrHapticPcmVibrationFB}, {@link XrHapticVibration}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrHapticActionInfo}, {@link XrHapticBaseHeader}, {@link XrHapticVibration}, {@link #xrStopHapticFeedback StopHapticFeedback}
*
* @param session the {@code XrSession} to start outputting to.
* @param hapticActionInfo a pointer to {@link XrHapticActionInfo} to provide action and subaction paths information.
* @param hapticFeedback a pointer to a haptic event structure which starts with an {@link XrHapticBaseHeader}.
*/
@NativeType("XrResult")
public static int xrApplyHapticFeedback(XrSession session, @NativeType("XrHapticActionInfo const *") XrHapticActionInfo hapticActionInfo, @NativeType("XrHapticBaseHeader const *") XrHapticBaseHeader hapticFeedback) {
return nxrApplyHapticFeedback(session, hapticActionInfo.address(), hapticFeedback.address());
}
// --- [ xrStopHapticFeedback ] ---
/** Unsafe version of: {@link #xrStopHapticFeedback StopHapticFeedback} */
public static int nxrStopHapticFeedback(XrSession session, long hapticActionInfo) {
long __functionAddress = session.getCapabilities().xrStopHapticFeedback;
if (CHECKS) {
XrHapticActionInfo.validate(hapticActionInfo);
}
return callPPI(session.address(), hapticActionInfo, __functionAddress);
}
/**
* Stop haptic feedback.
*
* C Specification
*
* The {@link #xrStopHapticFeedback StopHapticFeedback} function is defined as:
*
*
* XrResult xrStopHapticFeedback(
* XrSession session,
* const XrHapticActionInfo* hapticActionInfo);
*
* Description
*
* If a haptic event from this {@code XrAction} is in progress, when this function is called the runtime must stop that event.
*
* If {@code session} is not focused, the runtime must return {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}.
*
* Valid Usage (Implicit)
*
*
* - {@code session} must be a valid {@code XrSession} handle
* - {@code hapticActionInfo} must be a pointer to a valid {@link XrHapticActionInfo} structure
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link #XR_SUCCESS SUCCESS}
* - {@link #XR_SESSION_LOSS_PENDING SESSION_LOSS_PENDING}
* - {@link #XR_SESSION_NOT_FOCUSED SESSION_NOT_FOCUSED}
*
* - On failure, this command returns
*
* - {@link #XR_ERROR_VALIDATION_FAILURE ERROR_VALIDATION_FAILURE}
* - {@link #XR_ERROR_RUNTIME_FAILURE ERROR_RUNTIME_FAILURE}
* - {@link #XR_ERROR_HANDLE_INVALID ERROR_HANDLE_INVALID}
* - {@link #XR_ERROR_INSTANCE_LOST ERROR_INSTANCE_LOST}
* - {@link #XR_ERROR_SESSION_LOST ERROR_SESSION_LOST}
* - {@link #XR_ERROR_PATH_UNSUPPORTED ERROR_PATH_UNSUPPORTED}
* - {@link #XR_ERROR_PATH_INVALID ERROR_PATH_INVALID}
* - {@link #XR_ERROR_ACTION_TYPE_MISMATCH ERROR_ACTION_TYPE_MISMATCH}
* - {@link #XR_ERROR_ACTIONSET_NOT_ATTACHED ERROR_ACTIONSET_NOT_ATTACHED}
*
*
*
* See Also
*
* {@link XrHapticActionInfo}, {@link #xrApplyHapticFeedback ApplyHapticFeedback}
*
* @param session the {@code XrSession} to stop outputting to.
* @param hapticActionInfo a pointer to an {@link XrHapticActionInfo} to provide action and subaction path information.
*/
@NativeType("XrResult")
public static int xrStopHapticFeedback(XrSession session, @NativeType("XrHapticActionInfo const *") XrHapticActionInfo hapticActionInfo) {
return nxrStopHapticFeedback(session, hapticActionInfo.address());
}
// --- [ XR_MAKE_VERSION ] ---
/**
* Packs a three-component version number into a packed version number integer.
*
* This macro can be used when constructing the {@link XrApplicationInfo}{@code ::apiVersion} parameter passed to {@link #xrCreateInstance CreateInstance}.
*
* @param major the major version number, packed into the most-significant 16 bits
* @param minor the minor version number, packed into the second-most-significant group of 16 bits
* @param patch the patch version number, in the least-significant 32 bits
*/
@NativeType("uint64_t")
public static long XR_MAKE_VERSION(@NativeType("uint16_t") int major, @NativeType("uint16_t") int minor, @NativeType("uint32_t") int patch) {
return ((major & 0xFFFFL) << 48) | ((minor & 0xFFFFL) << 32) | (patch & 0xFFFF_FFFFL);
}
// --- [ XR_VERSION_MAJOR ] ---
/**
* Extracts the major version number from a packed version number.
*
* @param version a packed version number
*/
@NativeType("uint16_t")
public static short XR_VERSION_MAJOR(@NativeType("uint64_t") long version) {
return (short)((version >> 48) & 0xFFFFL);
}
// --- [ XR_VERSION_MINOR ] ---
/**
* Extracts the minor version number from a packed version number.
*
* @param version a packed version number
*/
@NativeType("uint16_t")
public static short XR_VERSION_MINOR(@NativeType("uint64_t") long version) {
return (short)((version >> 32) & 0xFFFFL);
}
// --- [ XR_VERSION_PATCH ] ---
/**
* Extracts the patch version number from a packed version number.
*
* @param version a packed version number
*/
@NativeType("uint32_t")
public static int XR_VERSION_PATCH(@NativeType("uint64_t") long version) {
return (int)(version & 0xFFFF_FFFFL);
}
// --- [ XR_SUCCEEDED ] ---
@NativeType("bool")
public static boolean XR_SUCCEEDED(int result) {
return result >= 0;
}
// --- [ XR_UNQUALIFIED_SUCCESS ] ---
@NativeType("bool")
public static boolean XR_UNQUALIFIED_SUCCESS(int result) {
return result == 0;
}
// --- [ XR_FAILED ] ---
@NativeType("bool")
public static boolean XR_FAILED(int result) {
return result < 0;
}
}