Class XR10
- java.lang.Object
-
- org.lwjgl.openxr.XR10
-
public class XR10 extends java.lang.ObjectThe core OpenXR 1.0 functionality.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrAcquireSwapchainImage(XrSwapchain swapchain, long acquireInfo, long index)Unsafe version of:AcquireSwapchainImagestatic intnxrApplyHapticFeedback(XrSession session, long hapticActionInfo, long hapticFeedback)Unsafe version of:ApplyHapticFeedbackstatic intnxrAttachSessionActionSets(XrSession session, long attachInfo)Unsafe version of:AttachSessionActionSetsstatic intnxrBeginFrame(XrSession session, long frameBeginInfo)Unsafe version of:BeginFramestatic intnxrBeginSession(XrSession session, long beginInfo)Unsafe version of:BeginSessionstatic intnxrCreateAction(XrActionSet actionSet, long createInfo, long action)Unsafe version of:CreateActionstatic intnxrCreateActionSet(org.lwjgl.openxr.XrInstance instance, long createInfo, long actionSet)Unsafe version of:CreateActionSetstatic intnxrCreateActionSpace(XrSession session, long createInfo, long space)Unsafe version of:CreateActionSpacestatic intnxrCreateInstance(long createInfo, long instance)Unsafe version of:CreateInstancestatic intnxrCreateReferenceSpace(XrSession session, long createInfo, long space)Unsafe version of:CreateReferenceSpacestatic intnxrCreateSession(org.lwjgl.openxr.XrInstance instance, long createInfo, long session)Unsafe version of:CreateSessionstatic intnxrCreateSwapchain(XrSession session, long createInfo, long swapchain)Unsafe version of:CreateSwapchainstatic intnxrEndFrame(XrSession session, long frameEndInfo)Unsafe version of:EndFramestatic intnxrEnumerateApiLayerProperties(int propertyCapacityInput, long propertyCountOutput, long properties)Unsafe version of:EnumerateApiLayerPropertiesstatic intnxrEnumerateBoundSourcesForAction(XrSession session, long enumerateInfo, int sourceCapacityInput, long sourceCountOutput, long sources)Unsafe version of:EnumerateBoundSourcesForActionstatic intnxrEnumerateEnvironmentBlendModes(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, int environmentBlendModeCapacityInput, long environmentBlendModeCountOutput, long environmentBlendModes)Unsafe version of:EnumerateEnvironmentBlendModesstatic intnxrEnumerateInstanceExtensionProperties(long layerName, int propertyCapacityInput, long propertyCountOutput, long properties)Unsafe version of:EnumerateInstanceExtensionPropertiesstatic intnxrEnumerateReferenceSpaces(XrSession session, int spaceCapacityInput, long spaceCountOutput, long spaces)Unsafe version of:EnumerateReferenceSpacesstatic intnxrEnumerateSwapchainFormats(XrSession session, int formatCapacityInput, long formatCountOutput, long formats)Unsafe version of:EnumerateSwapchainFormatsstatic intnxrEnumerateSwapchainImages(XrSwapchain swapchain, int imageCapacityInput, long imageCountOutput, long images)Unsafe version of:EnumerateSwapchainImagesstatic intnxrEnumerateViewConfigurations(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationsTypeCapacityInput, long viewConfigurationsTypeCountOutput, long viewConfigurationsTypes)Unsafe version of:EnumerateViewConfigurationsstatic intnxrEnumerateViewConfigurationViews(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, int viewCapacityInput, long viewCountOutput, long views)Unsafe version of:EnumerateViewConfigurationViewsstatic intnxrGetActionStateBoolean(XrSession session, long getInfo, long state)Unsafe version of:GetActionStateBooleanstatic intnxrGetActionStateFloat(XrSession session, long getInfo, long state)Unsafe version of:GetActionStateFloatstatic intnxrGetActionStatePose(XrSession session, long getInfo, long state)Unsafe version of:GetActionStatePosestatic intnxrGetActionStateVector2f(XrSession session, long getInfo, long state)Unsafe version of:GetActionStateVector2fstatic intnxrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, long interactionProfile)Unsafe version of:GetCurrentInteractionProfilestatic intnxrGetInputSourceLocalizedName(XrSession session, long getInfo, int bufferCapacityInput, long bufferCountOutput, long buffer)Unsafe version of:GetInputSourceLocalizedNamestatic intnxrGetInstanceProcAddr(long instance, long name, long function)Unsafe version of:GetInstanceProcAddrstatic intnxrGetInstanceProperties(org.lwjgl.openxr.XrInstance instance, long instanceProperties)Unsafe version of:GetInstancePropertiesstatic intnxrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, long bounds)Unsafe version of:GetReferenceSpaceBoundsRectstatic intnxrGetSystem(org.lwjgl.openxr.XrInstance instance, long getInfo, long systemId)Unsafe version of:GetSystemstatic intnxrGetSystemProperties(org.lwjgl.openxr.XrInstance instance, long systemId, long properties)Unsafe version of:GetSystemPropertiesstatic intnxrGetViewConfigurationProperties(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, long configurationProperties)Unsafe version of:GetViewConfigurationPropertiesstatic intnxrLocateSpace(XrSpace space, XrSpace baseSpace, long time, long location)Unsafe version of:LocateSpacestatic intnxrLocateViews(XrSession session, long viewLocateInfo, long viewState, int viewCapacityInput, long viewCountOutput, long views)Unsafe version of:LocateViewsstatic intnxrPathToString(org.lwjgl.openxr.XrInstance instance, long path, int bufferCapacityInput, long bufferCountOutput, long buffer)Unsafe version of:PathToStringstatic intnxrPollEvent(org.lwjgl.openxr.XrInstance instance, long eventData)Unsafe version of:PollEventstatic intnxrReleaseSwapchainImage(XrSwapchain swapchain, long releaseInfo)Unsafe version of:ReleaseSwapchainImagestatic intnxrResultToString(org.lwjgl.openxr.XrInstance instance, int value, long buffer)Unsafe version of:ResultToStringstatic intnxrStopHapticFeedback(XrSession session, long hapticActionInfo)Unsafe version of:StopHapticFeedbackstatic intnxrStringToPath(org.lwjgl.openxr.XrInstance instance, long pathString, long path)Unsafe version of:StringToPathstatic intnxrStructureTypeToString(org.lwjgl.openxr.XrInstance instance, int value, long buffer)Unsafe version of:StructureTypeToStringstatic intnxrSuggestInteractionProfileBindings(org.lwjgl.openxr.XrInstance instance, long suggestedBindings)Unsafe version of:SuggestInteractionProfileBindingsstatic intnxrSyncActions(XrSession session, long syncInfo)Unsafe version of:SyncActionsstatic intnxrWaitFrame(XrSession session, long frameWaitInfo, long frameState)Unsafe version of:WaitFramestatic intnxrWaitSwapchainImage(XrSwapchain swapchain, long waitInfo)Unsafe version of:WaitSwapchainImagestatic booleanXR_FAILED(int result)static longXR_MAKE_VERSION(int major, int minor, int patch)Packs a three-component version number into a packed version number integer.static booleanXR_SUCCEEDED(int result)static booleanXR_UNQUALIFIED_SUCCESS(int result)static shortXR_VERSION_MAJOR(long version)Extracts the major version number from a packed version number.static shortXR_VERSION_MINOR(long version)Extracts the minor version number from a packed version number.static intXR_VERSION_PATCH(long version)Extracts the patch version number from a packed version number.static intxrAcquireSwapchainImage(XrSwapchain swapchain, XrSwapchainImageAcquireInfo acquireInfo, java.nio.IntBuffer index)Acquire a swapchain image.static intxrApplyHapticFeedback(XrSession session, XrHapticActionInfo hapticActionInfo, XrHapticBaseHeader hapticFeedback)Apply haptic feedback.static intxrAttachSessionActionSets(XrSession session, XrSessionActionSetsAttachInfo attachInfo)Attaches action sets to a given session.static intxrBeginFrame(XrSession session, XrFrameBeginInfo frameBeginInfo)Marks a frame.static intxrBeginSession(XrSession session, XrSessionBeginInfo beginInfo)Begins an XrSession.static intxrCreateAction(XrActionSet actionSet, XrActionCreateInfo createInfo, org.lwjgl.PointerBuffer action)Creates an XrAction.static intxrCreateActionSet(org.lwjgl.openxr.XrInstance instance, XrActionSetCreateInfo createInfo, org.lwjgl.PointerBuffer actionSet)Creates an XrActionSet.static intxrCreateActionSpace(XrSession session, XrActionSpaceCreateInfo createInfo, org.lwjgl.PointerBuffer space)Creates a space based on a pose action.static intxrCreateInstance(XrInstanceCreateInfo createInfo, org.lwjgl.PointerBuffer instance)Creates an OpenXR Instance.static intxrCreateReferenceSpace(XrSession session, XrReferenceSpaceCreateInfo createInfo, org.lwjgl.PointerBuffer space)Creates a reference space.static intxrCreateSession(org.lwjgl.openxr.XrInstance instance, XrSessionCreateInfo createInfo, org.lwjgl.PointerBuffer session)Creates an XrSession.static intxrCreateSwapchain(XrSession session, XrSwapchainCreateInfo createInfo, org.lwjgl.PointerBuffer swapchain)Creates an XrSwapchain.static intxrDestroyAction(XrAction action)Destroys an XrAction.static intxrDestroyActionSet(XrActionSet actionSet)Destroys an XrActionSet.static intxrDestroyInstance(org.lwjgl.openxr.XrInstance instance)Destroy an instance of OpenXR.static intxrDestroySession(XrSession session)Destroys an XrSession.static intxrDestroySpace(XrSpace space)Creates a space based on a pose action.static intxrDestroySwapchain(XrSwapchain swapchain)Destroys an XrSwapchain.static intxrEndFrame(XrSession session, XrFrameEndInfo frameEndInfo)Marks a frame.static intxrEndSession(XrSession session)Ends an XrSession.static intxrEnumerateApiLayerProperties(java.nio.IntBuffer propertyCountOutput, XrApiLayerProperties.Buffer properties)Returns up to requested number of global layer properties.static intxrEnumerateBoundSourcesForAction(XrSession session, XrBoundSourcesForActionEnumerateInfo enumerateInfo, java.nio.IntBuffer sourceCountOutput, java.nio.LongBuffer sources)Queries the bound input sources for an action.static intxrEnumerateEnvironmentBlendModes(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, java.nio.IntBuffer environmentBlendModeCountOutput, java.nio.IntBuffer environmentBlendModes)Lists environment blend modes.static intxrEnumerateInstanceExtensionProperties(java.lang.CharSequence layerName, java.nio.IntBuffer propertyCountOutput, XrExtensionProperties.Buffer properties)Returns properties of available instance extensions.static intxrEnumerateInstanceExtensionProperties(java.nio.ByteBuffer layerName, java.nio.IntBuffer propertyCountOutput, XrExtensionProperties.Buffer properties)Returns properties of available instance extensions.static intxrEnumerateReferenceSpaces(XrSession session, java.nio.IntBuffer spaceCountOutput, java.nio.IntBuffer spaces)Enumerate available reference spaces.static intxrEnumerateSwapchainFormats(XrSession session, java.nio.IntBuffer formatCountOutput, java.nio.LongBuffer formats)Enumerates swapchain formats.static intxrEnumerateSwapchainImages(XrSwapchain swapchain, java.nio.IntBuffer imageCountOutput, XrSwapchainImageBaseHeader.Buffer images)Gets images from an XrSwapchain.static intxrEnumerateViewConfigurations(org.lwjgl.openxr.XrInstance instance, long systemId, java.nio.IntBuffer viewConfigurationsTypeCountOutput, java.nio.IntBuffer viewConfigurationsTypes)Enumerates supported view configurations.static intxrEnumerateViewConfigurationViews(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, java.nio.IntBuffer viewCountOutput, XrViewConfigurationView.Buffer views)Gets view configuration views.static intxrGetActionStateBoolean(XrSession session, XrActionStateGetInfo getInfo, XrActionStateBoolean state)Gets boolean action state.static intxrGetActionStateFloat(XrSession session, XrActionStateGetInfo getInfo, XrActionStateFloat state)Gets a floating point action state.static intxrGetActionStatePose(XrSession session, XrActionStateGetInfo getInfo, XrActionStatePose state)Gets metadata from a pose action.static intxrGetActionStateVector2f(XrSession session, XrActionStateGetInfo getInfo, XrActionStateVector2f state)Gets 2D float vector action state.static intxrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, XrInteractionProfileState interactionProfile)Gets the current interaction profile for a top level user paths.static intxrGetInputSourceLocalizedName(XrSession session, XrInputSourceLocalizedNameGetInfo getInfo, java.nio.IntBuffer bufferCountOutput, java.nio.ByteBuffer buffer)Gets a localized source name.static intxrGetInstanceProcAddr(org.lwjgl.openxr.XrInstance instance, java.lang.CharSequence name, org.lwjgl.PointerBuffer function)Gets a function pointer for an OpenXR function.static intxrGetInstanceProcAddr(org.lwjgl.openxr.XrInstance instance, java.nio.ByteBuffer name, org.lwjgl.PointerBuffer function)Gets a function pointer for an OpenXR function.static intxrGetInstanceProperties(org.lwjgl.openxr.XrInstance instance, XrInstanceProperties instanceProperties)Gets information about the instance.static intxrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, XrExtent2Df bounds)Gets the bounds rectangle of a reference space.static intxrGetSystem(org.lwjgl.openxr.XrInstance instance, XrSystemGetInfo getInfo, java.nio.LongBuffer systemId)Gets a system identifier.static intxrGetSystemProperties(org.lwjgl.openxr.XrInstance instance, long systemId, XrSystemProperties properties)Gets the properties of a particular system.static intxrGetViewConfigurationProperties(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, XrViewConfigurationProperties configurationProperties)Gets information for a view configuration.static intxrLocateSpace(XrSpace space, XrSpace baseSpace, long time, XrSpaceLocation location)Locates a space with reference to another space.static intxrLocateViews(XrSession session, XrViewLocateInfo viewLocateInfo, XrViewState viewState, java.nio.IntBuffer viewCountOutput, XrView.Buffer views)Gets view and projection info.static intxrPathToString(org.lwjgl.openxr.XrInstance instance, long path, java.nio.IntBuffer bufferCountOutput, java.nio.ByteBuffer buffer)Converts a semantic path to a string.static intxrPollEvent(org.lwjgl.openxr.XrInstance instance, XrEventDataBuffer eventData)Polls for events.static intxrReleaseSwapchainImage(XrSwapchain swapchain, XrSwapchainImageReleaseInfo releaseInfo)Release a swapchain image.static intxrRequestExitSession(XrSession session)Request to exit a running session.static intxrResultToString(org.lwjgl.openxr.XrInstance instance, int value, java.nio.ByteBuffer buffer)Converts an XrResult to a UTF-8 string.static intxrStopHapticFeedback(XrSession session, XrHapticActionInfo hapticActionInfo)Stop haptic feedback.static intxrStringToPath(org.lwjgl.openxr.XrInstance instance, java.lang.CharSequence pathString, java.nio.LongBuffer path)Converts a string to a semantic path.static intxrStringToPath(org.lwjgl.openxr.XrInstance instance, java.nio.ByteBuffer pathString, java.nio.LongBuffer path)Converts a string to a semantic path.static intxrStructureTypeToString(org.lwjgl.openxr.XrInstance instance, int value, java.nio.ByteBuffer buffer)Converts an XrStructureType to a UTF-8 string.static intxrSuggestInteractionProfileBindings(org.lwjgl.openxr.XrInstance instance, XrInteractionProfileSuggestedBinding suggestedBindings)Sets the application-suggested bindings for the interaction profile.static intxrSyncActions(XrSession session, XrActionsSyncInfo syncInfo)Updates the current state of input actions.static intxrWaitFrame(XrSession session, XrFrameWaitInfo frameWaitInfo, XrFrameState frameState)Frame timing function.static intxrWaitSwapchainImage(XrSwapchain swapchain, XrSwapchainImageWaitInfo waitInfo)Wait for a swapchain image to be available.
-
-
-
Field Detail
-
XR_SUCCESS, XR_TIMEOUT_EXPIRED, XR_SESSION_LOSS_PENDING, XR_EVENT_UNAVAILABLE, XR_SPACE_BOUNDS_UNAVAILABLE, XR_SESSION_NOT_FOCUSED, XR_FRAME_DISCARDED, XR_ERROR_VALIDATION_FAILURE, XR_ERROR_RUNTIME_FAILURE, XR_ERROR_OUT_OF_MEMORY, XR_ERROR_API_VERSION_UNSUPPORTED, XR_ERROR_INITIALIZATION_FAILED, XR_ERROR_FUNCTION_UNSUPPORTED, XR_ERROR_FEATURE_UNSUPPORTED, XR_ERROR_EXTENSION_NOT_PRESENT, XR_ERROR_LIMIT_REACHED, XR_ERROR_SIZE_INSUFFICIENT, XR_ERROR_HANDLE_INVALID, XR_ERROR_INSTANCE_LOST, XR_ERROR_SESSION_RUNNING, XR_ERROR_SESSION_NOT_RUNNING, XR_ERROR_SESSION_LOST, XR_ERROR_SYSTEM_INVALID, XR_ERROR_PATH_INVALID, XR_ERROR_PATH_COUNT_EXCEEDED, XR_ERROR_PATH_FORMAT_INVALID, XR_ERROR_PATH_UNSUPPORTED, XR_ERROR_LAYER_INVALID, XR_ERROR_LAYER_LIMIT_EXCEEDED, XR_ERROR_SWAPCHAIN_RECT_INVALID, XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED, XR_ERROR_ACTION_TYPE_MISMATCH, XR_ERROR_SESSION_NOT_READY, XR_ERROR_SESSION_NOT_STOPPING, XR_ERROR_TIME_INVALID, XR_ERROR_REFERENCE_SPACE_UNSUPPORTED, XR_ERROR_FILE_ACCESS_ERROR, XR_ERROR_FILE_CONTENTS_INVALID, XR_ERROR_FORM_FACTOR_UNSUPPORTED, XR_ERROR_FORM_FACTOR_UNAVAILABLE, XR_ERROR_API_LAYER_NOT_PRESENT, XR_ERROR_CALL_ORDER_INVALID, XR_ERROR_GRAPHICS_DEVICE_INVALID, XR_ERROR_POSE_INVALID, XR_ERROR_INDEX_OUT_OF_RANGE, XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED, XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED, XR_ERROR_NAME_DUPLICATED, XR_ERROR_NAME_INVALID, XR_ERROR_ACTIONSET_NOT_ATTACHED, XR_ERROR_ACTIONSETS_ALREADY_ATTACHED, XR_ERROR_LOCALIZED_NAME_DUPLICATED, XR_ERROR_LOCALIZED_NAME_INVALID, XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING, XR_ERROR_RUNTIME_UNAVAILABLE
XrResult - Result codesDescription
All return codes in the API are reported via
XrResultreturn values.Some common suffixes shared across many of the return codes are defined below:
_INVALID: The specified handle, atom or value is formatted incorrectly, or the specified handle was never created or has been destroyed._UNSUPPORTED: The specified handle, atom, enumerant or value is formatted correctly but cannot be used for the lifetime of this function’s parent handle._UNAVAILABLE: The specified handle, atom, enumerant or value is supported by this function’s parent handle but not at this moment.
Success Codes
Enum Description SUCCESSFunction successfully completed. TIMEOUT_EXPIREDThe specified timeout time occurred before the operation could complete. SESSION_LOSS_PENDINGThe session will be lost soon. EVENT_UNAVAILABLENo event was available. SPACE_BOUNDS_UNAVAILABLEThe space’s bounds are not known at the moment. SESSION_NOT_FOCUSEDThe session is not in the focused state. FRAME_DISCARDEDA frame has been discarded from composition. RENDER_MODEL_UNAVAILABLE_FBThe model is unavailable. (Added by the XR_FB_render_modelextension)Error Codes
Enum Description ERROR_VALIDATION_FAILUREThe function usage was invalid in some way. ERROR_RUNTIME_FAILUREThe runtime failed to handle the function in an unexpected way that is not covered by another error result. ERROR_OUT_OF_MEMORYA memory allocation has failed. ERROR_API_VERSION_UNSUPPORTEDThe runtime does not support the requested API version. ERROR_INITIALIZATION_FAILEDInitialization of object could not be completed. ERROR_FUNCTION_UNSUPPORTEDThe requested function was not found or is otherwise unsupported. ERROR_FEATURE_UNSUPPORTEDThe requested feature is not supported. ERROR_EXTENSION_NOT_PRESENTA requested extension is not supported. ERROR_LIMIT_REACHEDThe runtime supports no more of the requested resource. ERROR_SIZE_INSUFFICIENTThe supplied size was smaller than required. ERROR_HANDLE_INVALIDA supplied object handle was invalid. ERROR_INSTANCE_LOSTThe XrInstancewas lost or could not be found. It will need to be destroyed and optionally recreated.ERROR_SESSION_RUNNINGThe session is already running. ERROR_SESSION_NOT_RUNNINGThe session is not yet running. ERROR_SESSION_LOSTThe XrSessionwas lost. It will need to be destroyed and optionally recreated.ERROR_SYSTEM_INVALIDThe provided XrSystemIdwas invalid.ERROR_PATH_INVALIDThe provided XrPathwas not valid.ERROR_PATH_COUNT_EXCEEDEDThe maximum number of supported semantic paths has been reached. ERROR_PATH_FORMAT_INVALIDThe semantic path character format is invalid. ERROR_PATH_UNSUPPORTEDThe semantic path is unsupported. ERROR_LAYER_INVALIDThe layer was NULL or otherwise invalid. ERROR_LAYER_LIMIT_EXCEEDEDThe number of specified layers is greater than the supported number. ERROR_SWAPCHAIN_RECT_INVALIDThe image rect was negatively sized or otherwise invalid. ERROR_SWAPCHAIN_FORMAT_UNSUPPORTEDThe image format is not supported by the runtime or platform. ERROR_ACTION_TYPE_MISMATCHThe API used to retrieve an action’s state does not match the action’s type. ERROR_SESSION_NOT_READYThe session is not in the ready state. ERROR_SESSION_NOT_STOPPINGThe session is not in the stopping state. ERROR_TIME_INVALIDThe provided XrTimewas zero, negative, or out of range.ERROR_REFERENCE_SPACE_UNSUPPORTEDThe specified reference space is not supported by the runtime or system. ERROR_FILE_ACCESS_ERRORThe file could not be accessed. ERROR_FILE_CONTENTS_INVALIDThe file’s contents were invalid. ERROR_FORM_FACTOR_UNSUPPORTEDThe specified form factor is not supported by the current runtime or platform. ERROR_FORM_FACTOR_UNAVAILABLEThe specified form factor is supported, but the device is currently not available, e.g. not plugged in or powered off. ERROR_API_LAYER_NOT_PRESENTA requested API layer is not present or could not be loaded. ERROR_CALL_ORDER_INVALIDThe call was made without having made a previously required call. ERROR_GRAPHICS_DEVICE_INVALIDThe given graphics device is not in a valid state. The graphics device could be lost or initialized without meeting graphics requirements. ERROR_POSE_INVALIDThe supplied pose was invalid with respect to the requirements. ERROR_INDEX_OUT_OF_RANGEThe supplied index was outside the range of valid indices. ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTEDThe specified view configuration type is not supported by the runtime or platform. ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTEDThe specified environment blend mode is not supported by the runtime or platform. ERROR_NAME_DUPLICATEDThe name provided was a duplicate of an already-existing resource. ERROR_NAME_INVALIDThe name provided was invalid. ERROR_ACTIONSET_NOT_ATTACHEDA referenced action set is not attached to the session. ERROR_ACTIONSETS_ALREADY_ATTACHEDThe session already has attached action sets. ERROR_LOCALIZED_NAME_DUPLICATEDThe localized name provided was a duplicate of an already-existing resource. ERROR_LOCALIZED_NAME_INVALIDThe localized name provided was invalid. ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSINGThe xrGetGraphicsRequirements* call was not made before callingxrCreateSession.ERROR_RUNTIME_UNAVAILABLEThe loader was unable to find or load a runtime. ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFTSpatial anchor could not be created at that location. (Added by the XR_MSFT_spatial_anchorextension)ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFTThe secondary view configuration was not enabled when creating the session. (Added by the XR_MSFT_secondary_view_configurationextension)ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFTThe controller model key is invalid. (Added by the XR_MSFT_controller_modelextension)ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFTThe reprojection mode is not supported. (Added by the XR_MSFT_composition_layer_reprojectionextension)ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFTCompute new scene not completed. (Added by the XR_MSFT_scene_understandingextension)ERROR_SCENE_COMPONENT_ID_INVALID_MSFTScene component id invalid. (Added by the XR_MSFT_scene_understandingextension)ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFTScene component type mismatch. (Added by the XR_MSFT_scene_understandingextension)ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFTScene mesh buffer id invalid. (Added by the XR_MSFT_scene_understandingextension)ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFTScene compute feature incompatible. (Added by the XR_MSFT_scene_understandingextension)ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFTScene compute consistency mismatch. (Added by the XR_MSFT_scene_understandingextension)ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FBThe display refresh rate is not supported by the platform. (Added by the XR_FB_display_refresh_rateextension)ERROR_COLOR_SPACE_UNSUPPORTED_FBThe color space is not supported by the runtime. (Added by the XR_FB_color_spaceextension)ERROR_UNEXPECTED_STATE_PASSTHROUGH_FBThe object state is unexpected for the issued command. (Added by the XR_FB_passthroughextension)ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FBTrying to create an MR feature when one was already created and only one instance is allowed. (Added by the XR_FB_passthroughextension)ERROR_FEATURE_REQUIRED_PASSTHROUGH_FBRequested functionality requires a feature to be created first. (Added by the XR_FB_passthroughextension)ERROR_NOT_PERMITTED_PASSTHROUGH_FBRequested functionality is not permitted - application is not allowed to perform the requested operation. (Added by the XR_FB_passthroughextension)ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FBThere weren’t sufficient resources available to perform an operation. (Added by the XR_FB_passthroughextension)ERROR_UNKNOWN_PASSTHROUGH_FBUnknown Passthrough error (no further details provided). (Added by the XR_FB_passthroughextension)ERROR_RENDER_MODEL_KEY_INVALID_FBThe model key is invalid. (Added by the XR_FB_render_modelextension)ERROR_MARKER_NOT_TRACKED_VARJOMarker tracking is disabled or the specified marker is not currently tracked. (Added by the XR_VARJO_marker_trackingextension)ERROR_MARKER_ID_INVALID_VARJOThe specified marker ID is not valid. (Added by the XR_VARJO_marker_trackingextension)ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFTA spatial anchor was not found associated with the spatial anchor name provided (Added by the XR_MSFT_spatial_anchor_persistenceextension)ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFTThe spatial anchor name provided was not valid (Added by the XR_MSFT_spatial_anchor_persistenceextension)See Also
-
XR_TYPE_UNKNOWN, XR_TYPE_API_LAYER_PROPERTIES, XR_TYPE_EXTENSION_PROPERTIES, XR_TYPE_INSTANCE_CREATE_INFO, XR_TYPE_SYSTEM_GET_INFO, XR_TYPE_SYSTEM_PROPERTIES, XR_TYPE_VIEW_LOCATE_INFO, XR_TYPE_VIEW, XR_TYPE_SESSION_CREATE_INFO, XR_TYPE_SWAPCHAIN_CREATE_INFO, XR_TYPE_SESSION_BEGIN_INFO, XR_TYPE_VIEW_STATE, XR_TYPE_FRAME_END_INFO, XR_TYPE_HAPTIC_VIBRATION, XR_TYPE_EVENT_DATA_BUFFER, XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING, XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED, XR_TYPE_ACTION_STATE_BOOLEAN, XR_TYPE_ACTION_STATE_FLOAT, XR_TYPE_ACTION_STATE_VECTOR2F, XR_TYPE_ACTION_STATE_POSE, XR_TYPE_ACTION_SET_CREATE_INFO, XR_TYPE_ACTION_CREATE_INFO, XR_TYPE_INSTANCE_PROPERTIES, XR_TYPE_FRAME_WAIT_INFO, XR_TYPE_COMPOSITION_LAYER_PROJECTION, XR_TYPE_COMPOSITION_LAYER_QUAD, XR_TYPE_REFERENCE_SPACE_CREATE_INFO, XR_TYPE_ACTION_SPACE_CREATE_INFO, XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING, XR_TYPE_VIEW_CONFIGURATION_VIEW, XR_TYPE_SPACE_LOCATION, XR_TYPE_SPACE_VELOCITY, XR_TYPE_FRAME_STATE, XR_TYPE_VIEW_CONFIGURATION_PROPERTIES, XR_TYPE_FRAME_BEGIN_INFO, XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW, XR_TYPE_EVENT_DATA_EVENTS_LOST, XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING, XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED, XR_TYPE_INTERACTION_PROFILE_STATE, XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO, XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO, XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO, XR_TYPE_ACTION_STATE_GET_INFO, XR_TYPE_HAPTIC_ACTION_INFO, XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO, XR_TYPE_ACTIONS_SYNC_INFO, XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO, XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO
XrStructureType - Values for type members of structsDescription
Most structures containing
typemembers have a value oftypematching 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
110(base 10). Each extension is assigned a block of 1000 enums, starting at the enum base and arranged by the extension’s index.See Also
XrActionCreateInfo,XrActionSetCreateInfo,XrActionSpaceCreateInfo,XrActionStateBoolean,XrActionStateFloat,XrActionStateGetInfo,XrActionStatePose,XrActionStateVector2f,XrActionsSyncInfo,XrApiLayerProperties,XrBaseInStructure,XrBaseOutStructure,XrBindingModificationBaseHeaderKHR,XrBindingModificationsKHR,XrBoundSourcesForActionEnumerateInfo,XrCompositionLayerAlphaBlendFB,XrCompositionLayerBaseHeader,XrCompositionLayerColorScaleBiasKHR,XrCompositionLayerCubeKHR,XrCompositionLayerCylinderKHR,XrCompositionLayerDepthInfoKHR,XrCompositionLayerDepthTestVARJO,XrCompositionLayerEquirect2KHR,XrCompositionLayerEquirectKHR,XrCompositionLayerImageLayoutFB,XrCompositionLayerPassthroughFB,XrCompositionLayerProjection,XrCompositionLayerProjectionView,XrCompositionLayerQuad,XrCompositionLayerReprojectionInfoMSFT,XrCompositionLayerReprojectionPlaneOverrideMSFT,XrCompositionLayerSecureContentFB,XrCompositionLayerSpaceWarpInfoFB,XrControllerModelKeyStateMSFT,XrControllerModelNodePropertiesMSFT,XrControllerModelNodeStateMSFT,XrControllerModelPropertiesMSFT,XrControllerModelStateMSFT,XrDebugUtilsLabelEXT,XrDebugUtilsMessengerCallbackDataEXT,XrDebugUtilsMessengerCreateInfoEXT,XrDebugUtilsObjectNameInfoEXT,XrDigitalLensControlALMALENCE,XrEventDataBaseHeader,XrEventDataBuffer,XrEventDataDisplayRefreshRateChangedFB,XrEventDataEventsLost,XrEventDataInstanceLossPending,XrEventDataInteractionProfileChanged,XrEventDataMainSessionVisibilityChangedEXTX,XrEventDataMarkerTrackingUpdateVARJO,XrEventDataPassthroughStateChangedFB,XrEventDataPerfSettingsEXT,XrEventDataReferenceSpaceChangePending,XrEventDataSessionStateChanged,XrEventDataVisibilityMaskChangedKHR,XrEventDataViveTrackerConnectedHTCX,XrExtensionProperties,XrEyeGazeSampleTimeEXT,XrFacialExpressionsHTC,XrFacialTrackerCreateInfoHTC,XrFoveatedViewConfigurationViewVARJO,XrFoveationLevelProfileCreateInfoFB,XrFoveationProfileCreateInfoFB,XrFrameBeginInfo,XrFrameEndInfo,XrFrameState,XrFrameWaitInfo,XrGeometryInstanceCreateInfoFB,XrGeometryInstanceTransformFB,XrGraphicsBindingEGLMNDX,XrGraphicsBindingOpenGLWaylandKHR,XrGraphicsBindingOpenGLWin32KHR,XrGraphicsBindingOpenGLXcbKHR,XrGraphicsBindingOpenGLXlibKHR,XrGraphicsBindingVulkanKHR,XrGraphicsRequirementsOpenGLESKHR,XrGraphicsRequirementsOpenGLKHR,XrGraphicsRequirementsVulkanKHR,XrHandJointLocationsEXT,XrHandJointVelocitiesEXT,XrHandJointsLocateInfoEXT,XrHandJointsMotionRangeInfoEXT,XrHandMeshMSFT,XrHandMeshSpaceCreateInfoMSFT,XrHandMeshUpdateInfoMSFT,XrHandPoseTypeInfoMSFT,XrHandTrackerCreateInfoEXT,XrHandTrackingAimStateFB,XrHandTrackingCapsulesStateFB,XrHandTrackingMeshFB,XrHandTrackingScaleFB,XrHapticActionInfo,XrHapticBaseHeader,XrHapticVibration,XrHolographicWindowAttachmentMSFT,XrInputSourceLocalizedNameGetInfo,XrInstanceCreateInfo,XrInstanceProperties,XrInteractionProfileAnalogThresholdVALVE,XrInteractionProfileState,XrInteractionProfileSuggestedBinding,XrKeyboardSpaceCreateInfoFB,XrKeyboardTrackingQueryFB,XrLoaderInitInfoBaseHeaderKHR,XrMarkerSpaceCreateInfoVARJO,XrNewSceneComputeInfoMSFT,XrPassthroughColorMapMonoToMonoFB,XrPassthroughColorMapMonoToRgbaFB,XrPassthroughCreateInfoFB,XrPassthroughKeyboardHandsIntensityFB,XrPassthroughLayerCreateInfoFB,XrPassthroughStyleFB,XrReferenceSpaceCreateInfo,XrRenderModelBufferFB,XrRenderModelLoadInfoFB,XrRenderModelPathInfoFB,XrRenderModelPropertiesFB,XrSceneComponentLocationsMSFT,XrSceneComponentParentFilterInfoMSFT,XrSceneComponentsGetInfoMSFT,XrSceneComponentsLocateInfoMSFT,XrSceneComponentsMSFT,XrSceneCreateInfoMSFT,XrSceneDeserializeInfoMSFT,XrSceneMeshBuffersGetInfoMSFT,XrSceneMeshBuffersMSFT,XrSceneMeshIndicesUint16MSFT,XrSceneMeshIndicesUint32MSFT,XrSceneMeshVertexBufferMSFT,XrSceneMeshesMSFT,XrSceneObjectTypesFilterInfoMSFT,XrSceneObjectsMSFT,XrSceneObserverCreateInfoMSFT,XrScenePlaneAlignmentFilterInfoMSFT,XrScenePlanesMSFT,XrSecondaryViewConfigurationFrameEndInfoMSFT,XrSecondaryViewConfigurationFrameStateMSFT,XrSecondaryViewConfigurationLayerInfoMSFT,XrSecondaryViewConfigurationSessionBeginInfoMSFT,XrSecondaryViewConfigurationStateMSFT,XrSecondaryViewConfigurationSwapchainCreateInfoMSFT,XrSerializedSceneFragmentDataGetInfoMSFT,XrSessionActionSetsAttachInfo,XrSessionBeginInfo,XrSessionCreateInfo,XrSessionCreateInfoOverlayEXTX,XrSpaceLocation,XrSpaceVelocity,XrSpatialAnchorCreateInfoMSFT,XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT,XrSpatialAnchorPersistenceInfoMSFT,XrSpatialAnchorSpaceCreateInfoMSFT,XrSpatialGraphNodeSpaceCreateInfoMSFT,XrSwapchainCreateInfo,XrSwapchainCreateInfoFoveationFB,XrSwapchainImageAcquireInfo,XrSwapchainImageBaseHeader,XrSwapchainImageFoveationVulkanFB,XrSwapchainImageOpenGLESKHR,XrSwapchainImageOpenGLKHR,XrSwapchainImageReleaseInfo,XrSwapchainImageVulkanKHR,XrSwapchainImageWaitInfo,XrSwapchainStateBaseHeaderFB,XrSwapchainStateFoveationFB,XrSwapchainStateSamplerOpenGLESFB,XrSwapchainStateSamplerVulkanFB,XrSystemColorSpacePropertiesFB,XrSystemEyeGazeInteractionPropertiesEXT,XrSystemFacialTrackingPropertiesHTC,XrSystemFoveatedRenderingPropertiesVARJO,XrSystemGetInfo,XrSystemHandTrackingMeshPropertiesMSFT,XrSystemHandTrackingPropertiesEXT,XrSystemKeyboardTrackingPropertiesFB,XrSystemMarkerTrackingPropertiesVARJO,XrSystemPassthroughPropertiesFB,XrSystemProperties,XrSystemRenderModelPropertiesFB,XrSystemSpaceWarpPropertiesFB,XrTriangleMeshCreateInfoFB,XrView,XrViewConfigurationDepthRangeEXT,XrViewConfigurationProperties,XrViewConfigurationView,XrViewConfigurationViewFovEPIC,XrViewLocateFoveatedRenderingVARJO,XrViewLocateInfo,XrViewState,XrVisibilityMaskKHR,XrVisualMeshComputeLodInfoMSFT,XrViveTrackerPathsHTCX,XrVulkanDeviceCreateInfoKHR,XrVulkanGraphicsDeviceGetInfoKHR,XrVulkanInstanceCreateInfoKHR,XrVulkanSwapchainFormatListCreateInfoKHR,StructureTypeToStringEnum values:
TYPE_UNKNOWNTYPE_API_LAYER_PROPERTIESTYPE_EXTENSION_PROPERTIESTYPE_INSTANCE_CREATE_INFOTYPE_SYSTEM_GET_INFOTYPE_SYSTEM_PROPERTIESTYPE_VIEW_LOCATE_INFOTYPE_VIEWTYPE_SESSION_CREATE_INFOTYPE_SWAPCHAIN_CREATE_INFOTYPE_SESSION_BEGIN_INFOTYPE_VIEW_STATETYPE_FRAME_END_INFOTYPE_HAPTIC_VIBRATIONTYPE_EVENT_DATA_BUFFERTYPE_EVENT_DATA_INSTANCE_LOSS_PENDINGTYPE_EVENT_DATA_SESSION_STATE_CHANGEDTYPE_ACTION_STATE_BOOLEANTYPE_ACTION_STATE_FLOATTYPE_ACTION_STATE_VECTOR2FTYPE_ACTION_STATE_POSETYPE_ACTION_SET_CREATE_INFOTYPE_ACTION_CREATE_INFOTYPE_INSTANCE_PROPERTIESTYPE_FRAME_WAIT_INFOTYPE_COMPOSITION_LAYER_PROJECTIONTYPE_COMPOSITION_LAYER_QUADTYPE_REFERENCE_SPACE_CREATE_INFOTYPE_ACTION_SPACE_CREATE_INFOTYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDINGTYPE_VIEW_CONFIGURATION_VIEWTYPE_SPACE_LOCATIONTYPE_SPACE_VELOCITYTYPE_FRAME_STATETYPE_VIEW_CONFIGURATION_PROPERTIESTYPE_FRAME_BEGIN_INFOTYPE_COMPOSITION_LAYER_PROJECTION_VIEWTYPE_EVENT_DATA_EVENTS_LOSTTYPE_INTERACTION_PROFILE_SUGGESTED_BINDINGTYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGEDTYPE_INTERACTION_PROFILE_STATETYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFOTYPE_SWAPCHAIN_IMAGE_WAIT_INFOTYPE_SWAPCHAIN_IMAGE_RELEASE_INFOTYPE_ACTION_STATE_GET_INFOTYPE_HAPTIC_ACTION_INFOTYPE_SESSION_ACTION_SETS_ATTACH_INFOTYPE_ACTIONS_SYNC_INFOTYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFOTYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO
-
XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY, XR_FORM_FACTOR_HANDHELD_DISPLAY
XrFormFactor - Supported form factorsDescription
The predefined form factors which may be supported by OpenXR runtimes are:
Enumerant Descriptions
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.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
-
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO, XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO
XrViewConfigurationType - Supported view configuration typeDescription
The application selects its primary view configuration type when calling
BeginSession, and that configuration remains constant for the lifetime of the session, untilEndSessionis 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
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 inXrViewConfigurationPropertiesand one projection in eachXrCompositionLayerProjectionlayer.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 inXrViewConfigurationPropertiesand two views in eachXrCompositionLayerProjectionlayer. View index 0 must represent the left eye and view index 1 must represent the right eye.
See Also
XrEventDataVisibilityMaskChangedKHR,XrSecondaryViewConfigurationLayerInfoMSFT,XrSecondaryViewConfigurationSessionBeginInfoMSFT,XrSecondaryViewConfigurationStateMSFT,XrSecondaryViewConfigurationSwapchainCreateInfoMSFT,XrSessionBeginInfo,XrViewConfigurationProperties,XrViewLocateInfo,EnumerateEnvironmentBlendModes,EnumerateReprojectionModesMSFT,EnumerateViewConfigurationViews,EnumerateViewConfigurations,GetViewConfigurationProperties,GetVisibilityMaskKHR
-
XR_ENVIRONMENT_BLEND_MODE_OPAQUE, XR_ENVIRONMENT_BLEND_MODE_ADDITIVE, XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND
XrEnvironmentBlendMode - Environment blend modesEnumerant Descriptions
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.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.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
XrFrameEndInfo,XrSecondaryViewConfigurationLayerInfoMSFT,EnumerateEnvironmentBlendModes
-
XR_SPACE_VELOCITY_LINEAR_VALID_BIT, XR_SPACE_VELOCITY_ANGULAR_VALID_BIT
XrSpaceVelocityFlagBitsEnum values:
-
XR_REFERENCE_SPACE_TYPE_VIEW, XR_REFERENCE_SPACE_TYPE_LOCAL, XR_REFERENCE_SPACE_TYPE_STAGE
XrReferenceSpaceType - Reference space typesDescription
Available reference space types are indicated by
EnumerateReferenceSpaces. Note that other spaces can be created as well, such as pose action spaces created byCreateActionSpace, which are not enumerated by that API.Enumerant Descriptions
REFERENCE_SPACE_TYPE_VIEW. TheVIEWspace 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.VIEWspace is primarily useful when projecting from the user’s perspective into another space to obtain a targeting ray, or when rendering small head-locked content such as a reticle. Content rendered inVIEWspace will stay at a fixed point on head-mounted displays and may be uncomfortable to view if too large. To obtain the ideal view and projection transforms to use each frame for rendering world content, applications should callLocateViewsinstead of using this space.Runtimes must support this reference space.
REFERENCE_SPACE_TYPE_LOCAL. TheLOCALreference 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.LOCALspace is useful when an application needs to render seated-scale content that is not positioned relative to the physical floor.When a user needs to recenter
LOCALspace, a runtime may offer some system-level recentering interaction that is transparent to the application, but which causes the current leveled head space to become the newLOCALspace. When such a recentering occurs, the runtime must queue theXrEventDataReferenceSpaceChangePendingevent, with the recenteredLOCALspace origin only taking effect forLocateSpaceorLocateViewscalls whoseXrTimeparameter is greater than or equal to thechangeTimeprovided in that event.When views, controllers or other spaces experience tracking loss relative to the
LOCALspace, runtimes should continue to provide inferred or last-knownpositionandorientationvalues. 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 setSPACE_LOCATION_POSITION_VALID_BITandVIEW_STATE_POSITION_VALID_BITbut it can clearSPACE_LOCATION_POSITION_TRACKED_BITandVIEW_STATE_POSITION_TRACKED_BITto indicate that the position is inferred or last-known in this way.When tracking is recovered, runtimes should snap the pose of other spaces back into position relative to the
LOCALspace’s original origin.Runtimes must support this reference space.
REFERENCE_SPACE_TYPE_STAGE. TheSTAGEreference 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 theSTAGEreference space if the user has not yet defined one within the runtime-specific UI. Applications can useGetReferenceSpaceBoundsRectto determine the extents of theSTAGEreference space’s XZ bounds rectangle, if defined.STAGEspace is useful when an application needs to render standing-scale content (no bounds) or room-scale content (with bounds) that is relative to the physical floor.When the user redefines the origin or bounds of the current
STAGEspace, or the runtime otherwise switches to a newSTAGEdefinition, the runtime must queue theXrEventDataReferenceSpaceChangePendingevent, with the newSTAGEspace origin only taking effect forLocateSpaceorLocateViewscalls whoseXrTimeparameter is greater than or equal to thechangeTimeprovided in that event.When views, controllers or other spaces experience tracking loss relative to the
STAGEspace, runtimes should continue to provide inferred or last-knownpositionandorientationvalues. 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 setSPACE_LOCATION_POSITION_VALID_BITandVIEW_STATE_POSITION_VALID_BITbut it can clearSPACE_LOCATION_POSITION_TRACKED_BITandVIEW_STATE_POSITION_TRACKED_BITto indicate that the position is inferred or last-known in this way.When tracking is recovered, runtimes should snap the pose of other spaces back into position relative to the
STAGEspace’s original origin.
See Also
XrEventDataReferenceSpaceChangePending,XrReferenceSpaceCreateInfo,EnumerateReferenceSpaces,GetReferenceSpaceBoundsRect
-
XR_SPACE_LOCATION_ORIENTATION_VALID_BIT, XR_SPACE_LOCATION_POSITION_VALID_BIT, XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT, XR_SPACE_LOCATION_POSITION_TRACKED_BIT
XrSpaceLocationFlagBitsEnum values:
-
XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT, XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
XrSwapchainCreateFlagBitsEnum values:
-
XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT, XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT, XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT, XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT, XR_SWAPCHAIN_USAGE_SAMPLED_BIT, XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT
-
XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT, XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT, XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT
XrCompositionLayerFlagBitsEnum values:
-
XR_VIEW_STATE_ORIENTATION_VALID_BIT, XR_VIEW_STATE_POSITION_VALID_BIT, XR_VIEW_STATE_ORIENTATION_TRACKED_BIT, XR_VIEW_STATE_POSITION_TRACKED_BIT
XrViewStateFlagBitsEnum values:
-
XR_ACTION_TYPE_BOOLEAN_INPUT, XR_ACTION_TYPE_FLOAT_INPUT, XR_ACTION_TYPE_VECTOR2F_INPUT, XR_ACTION_TYPE_POSE_INPUT, XR_ACTION_TYPE_VIBRATION_OUTPUT
XrActionType - XrAction typeEnumerant Descriptions
ACTION_TYPE_BOOLEAN_INPUT. The action can be passed toGetActionStateBooleanto retrieve a boolean value.ACTION_TYPE_FLOAT_INPUT. The action can be passed toGetActionStateFloatto retrieve a float value.ACTION_TYPE_VECTOR2F_INPUT. The action can be passed toGetActionStateVector2fto retrieve a 2D float vector.ACTION_TYPE_POSE_INPUT. The action can can be passed toCreateActionSpaceto create a space.ACTION_TYPE_VIBRATION_OUTPUT. The action can be passed toApplyHapticFeedbackto send a haptic event to the runtime.
See Also
-
XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT, XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT, XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT
XrInputSourceLocalizedNameFlagBitsEnum values:
-
XR_EYE_VISIBILITY_BOTH, XR_EYE_VISIBILITY_LEFT, XR_EYE_VISIBILITY_RIGHT
XrEyeVisibility - Eye visibility selectorEnumerant Descriptions
EYE_VISIBILITY_BOTHdisplays the layer to both eyes.EYE_VISIBILITY_LEFTdisplays the layer to the viewer’s physical left eye.EYE_VISIBILITY_RIGHTdisplays the layer to the viewer’s physical right eye.
See Also
XrCompositionLayerCubeKHR,XrCompositionLayerCylinderKHR,XrCompositionLayerEquirect2KHR,XrCompositionLayerEquirectKHR,XrCompositionLayerQuad
-
XR_SESSION_STATE_UNKNOWN, XR_SESSION_STATE_IDLE, XR_SESSION_STATE_READY, XR_SESSION_STATE_SYNCHRONIZED, XR_SESSION_STATE_VISIBLE, XR_SESSION_STATE_FOCUSED, XR_SESSION_STATE_STOPPING, XR_SESSION_STATE_LOSS_PENDING, XR_SESSION_STATE_EXITING
XrSessionState - Session lifecycle stateEnumerant Descriptions
SESSION_STATE_UNKNOWN. An unknown state. The runtime must not return this value in anXrEventDataSessionStateChangedevent.SESSION_STATE_IDLE. The initial state after callingCreateSessionor returned to after callingEndSession.SESSION_STATE_READY. The application is ready to callBeginSessionand sync its frame loop with the runtime.SESSION_STATE_SYNCHRONIZED. The application has synced its frame loop with the runtime but is not visible to the user.SESSION_STATE_VISIBLE. The application has synced its frame loop with the runtime and is visible to the user but cannot receive XR input.SESSION_STATE_FOCUSED. The application has synced its frame loop with the runtime, is visible to the user and can receive XR input.SESSION_STATE_STOPPING. The application should exit its frame loop and callEndSession.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.SESSION_STATE_EXITING. The application should end its XR experience and not automatically restart it.
The
SESSION_STATE_UNKNOWNstate must not be returned by the runtime, and is only defined to avoid 0 being a valid state.Receiving the
SESSION_STATE_IDLEstate indicates that the runtime considers the session is idle. Applications in this state should minimize resource consumption but continue to callPollEventat some reasonable cadence.Receiving the
SESSION_STATE_READYstate 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 callingBeginSessionand then running its frame loop by callingWaitFrame,BeginFrameandEndFramein a loop. If the runtime wishes to return the session to theSESSION_STATE_IDLEstate, it must wait until the application callsBeginSession. After returning from theBeginSessioncall, the runtime may then immediately transition forward through theSESSION_STATE_SYNCHRONIZEDstate to theSESSION_STATE_STOPPINGstate, to request that the application end this session. If the system supports a user engagement sensor and runtime is inSESSION_STATE_IDLEstate, the runtime should not transition to theSESSION_STATE_READYstate until the user starts engaging with the device.Receiving the
SESSION_STATE_SYNCHRONIZEDstate 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 callingWaitFrame,BeginFrameandEndFrame, 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 untilWaitFramereturns anXrFrameStatewithshouldRenderset 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
SESSION_STATE_VISIBLEstate 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
SESSION_STATE_FOCUSEDstate 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
SESSION_STATE_STOPPINGstate indicates that the runtime has determined that the application should halt its rendering loop. Applications should exit their rendering loop and callEndSessionwhen 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 should transition to theSESSION_STATE_STOPPINGstate when the user stops engaging with the device.Receiving the
SESSION_STATE_EXITINGstate 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
SESSION_STATE_LOSS_PENDINGstate 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 callDestroySessionand may end its process or decide to pollGetSystemat some reasonable cadence to get a newXrSystemId, and re-initialize all graphics resources related to the new system, and then create a new session usingCreateSession. After the event is queued, subsequent calls to functions that acceptXrSessionparameters must no longer return any success code other thanSESSION_LOSS_PENDINGfor the givenXrSessionhandle. TheSESSION_LOSS_PENDINGsuccess 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.CreateSwapchain) when a lost session is pending, or if the runtime is not able to provide the application a grace period, the runtime may returnERROR_SESSION_LOST. Thereafter, functions which acceptXrSessionparameters for the lost session may returnERROR_SESSION_LOSTto indicate that the function failed and the given session was lost. TheXrSessionhandle 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
-
XR_OBJECT_TYPE_UNKNOWN, XR_OBJECT_TYPE_INSTANCE, XR_OBJECT_TYPE_SESSION, XR_OBJECT_TYPE_SWAPCHAIN, XR_OBJECT_TYPE_SPACE, XR_OBJECT_TYPE_ACTION_SET, XR_OBJECT_TYPE_ACTION
XrObjectType - Specify an enumeration to track object handle typesDescription
The
XrObjectTypeenumeration 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
XrObjectTypeand OpenXR Handle relationships:XrObjectTypeOpenXR Handle Type OBJECT_TYPE_UNKNOWNUnknown/Undefined Handle OBJECT_TYPE_INSTANCEXrInstanceOBJECT_TYPE_SESSIONXrSessionOBJECT_TYPE_SWAPCHAINXrSwapchainOBJECT_TYPE_SPACEXrSpaceOBJECT_TYPE_ACTION_SETXrActionSetOBJECT_TYPE_ACTIONXrActionSee Also
-
XR_CURRENT_API_VERSION
OpenXR current version number.
-
XR_USE_GRAPHICS_API_OPENGL, XR_USE_GRAPHICS_API_OPENGL_ES, XR_USE_GRAPHICS_API_VULKAN, XR_USE_PLATFORM_EGL, XR_USE_PLATFORM_WIN32, XR_USE_PLATFORM_XLIB, XR_USE_PLATFORM_XCB, XR_USE_PLATFORM_WAYLAND
Compile-time symbols, ignore.
-
XR_NULL_HANDLE, XR_NULL_PATH, XR_NULL_SYSTEM_ID, XR_NO_DURATION, XR_INFINITE_DURATION, XR_MIN_HAPTIC_DURATION, XR_MAX_EVENT_DATA_SIZE, XR_FREQUENCY_UNSPECIFIED, XR_TRUE, XR_FALSE, XR_MAX_EXTENSION_NAME_SIZE, XR_MAX_API_LAYER_NAME_SIZE, XR_MAX_API_LAYER_DESCRIPTION_SIZE, XR_MAX_SYSTEM_NAME_SIZE, XR_MAX_APPLICATION_NAME_SIZE, XR_MAX_ENGINE_NAME_SIZE, XR_MAX_RUNTIME_NAME_SIZE, XR_MAX_PATH_LENGTH, XR_MAX_STRUCTURE_NAME_SIZE, XR_MAX_RESULT_STRING_SIZE, XR_MAX_GRAPHICS_APIS_SUPPORTED, XR_MAX_ACTION_SET_NAME_SIZE, XR_MAX_ACTION_NAME_SIZE, XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE, XR_MAX_LOCALIZED_ACTION_NAME_SIZE, XR_MIN_COMPOSITION_LAYERS_SUPPORTED
API Constants
-
-
Method Detail
-
nxrGetInstanceProcAddr
public static int nxrGetInstanceProcAddr(long instance, long name, long function)Unsafe version of:GetInstanceProcAddr
-
xrGetInstanceProcAddr
public static int xrGetInstanceProcAddr(@Nullable org.lwjgl.openxr.XrInstance instance, java.nio.ByteBuffer name, org.lwjgl.PointerBuffer function) public static int xrGetInstanceProcAddr(@Nullable org.lwjgl.openxr.XrInstance instance, java.lang.CharSequence name, org.lwjgl.PointerBuffer function)Gets a function pointer for an OpenXR function.C Specification
Function pointers for all OpenXR functions can be obtained with the function
GetInstanceProcAddr.XrResult xrGetInstanceProcAddr( XrInstance instance, const char* name, PFN_xrVoidFunction* function);Description
GetInstanceProcAddritself 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 useGetInstanceProcAddr.Because an application can call
GetInstanceProcAddrbefore creating an instance,GetInstanceProcAddrreturns a valid function pointer when theinstanceparameter isNULL_HANDLEand thenameparameter is one of the following strings:No Instance Required
GetInstanceProcAddrmust returnERROR_HANDLE_INVALIDifnameis not one of the above strings andinstanceisNULL_HANDLE.GetInstanceProcAddrmay returnERROR_HANDLE_INVALIDifnameis not one of the above strings andinstanceis invalid but notNULL_HANDLE.GetInstanceProcAddrmust returnERROR_FUNCTION_UNSUPPORTEDifinstanceis a valid instance and the string specified innameis not the name of an OpenXR core or enabled extension function.If
nameis the name of an extension function, then the result returned byGetInstanceProcAddrwill depend upon how theinstancewas created. Ifinstancewas created with the related extension’s name appearing in theXrInstanceCreateInfo::enabledExtensionNamesarray, thenGetInstanceProcAddrreturns a valid function pointer. If the related extension’s name did not appear in theXrInstanceCreateInfo::enabledExtensionNamesarray during the creation ofinstance, thenGetInstanceProcAddrreturnsERROR_FUNCTION_UNSUPPORTED. Because of this, function pointers returned byGetInstanceProcAddrusing oneXrInstancemay not be valid when used with objects related to a differentXrInstance.The returned function pointer is of type
PFN_xrVoidFunction, and must be cast to the type of the function being queried.The table below defines the various use cases for
GetInstanceProcAddrand return value (“fp” is “function pointer”) for each case.xrGetInstanceProcAddr behavior
instanceparameternameparameterreturn value * NULLundefined invalid instance * undefined NULLEnumerateInstanceExtensionPropertiesfp NULLEnumerateApiLayerPropertiesfp NULLCreateInstancefp NULL* (any namenot covered above)NULLinstance core OpenXR function fp1 instance enabled extension function for instancefp1 instance * (any namenot covered above)NULL- 1
- The returned function pointer must only be called with a handle (the first parameter) that is
instanceor a child ofinstance.
Valid Usage (Implicit)
- If
instanceis notNULL_HANDLE,instancemust be a validXrInstancehandle namemust be a null-terminated UTF-8 stringfunctionmust be a pointer to aPFN_xrVoidFunctionvalue
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance- the instance that the function pointer will be compatible with, orNULLfor functions not dependent on any instance.name- the name of the function to obtain.function- the address of the function pointer to get.
-
nxrEnumerateApiLayerProperties
public static int nxrEnumerateApiLayerProperties(int propertyCapacityInput, long propertyCountOutput, long properties)Unsafe version of:EnumerateApiLayerProperties- Parameters:
propertyCapacityInput- the capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateApiLayerProperties
public static int xrEnumerateApiLayerProperties(java.nio.IntBuffer propertyCountOutput, @Nullable XrApiLayerProperties.Buffer properties)Returns up to requested number of global layer properties.C Specification
To determine what set of API layers are available, OpenXR provides the
EnumerateApiLayerPropertiesfunction: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
EnumerateApiLayerPropertieswith the same parameters may return different results, or retrieve differentpropertyCountOutputvalues orpropertiescontents.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)
propertyCountOutputmust be a pointer to auint32_tvalue- If
propertyCapacityInputis not 0,propertiesmust be a pointer to an array ofpropertyCapacityInputXrApiLayerPropertiesstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
propertyCountOutput- a pointer to the count of properties written, or a pointer to the required capacity in the case that propertyCapacityInput is 0.properties- a pointer to an array ofXrApiLayerPropertiesstructures, but can beNULLif propertyCapacityInput is 0.
-
nxrEnumerateInstanceExtensionProperties
public static int nxrEnumerateInstanceExtensionProperties(long layerName, int propertyCapacityInput, long propertyCountOutput, long properties)Unsafe version of:EnumerateInstanceExtensionProperties- Parameters:
propertyCapacityInput- the capacity of the properties array, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateInstanceExtensionProperties
public static int xrEnumerateInstanceExtensionProperties(@Nullable java.nio.ByteBuffer layerName, java.nio.IntBuffer propertyCountOutput, @Nullable XrExtensionProperties.Buffer properties) public static int xrEnumerateInstanceExtensionProperties(@Nullable java.lang.CharSequence layerName, java.nio.IntBuffer propertyCountOutput, @Nullable XrExtensionProperties.Buffer properties)Returns properties of available instance extensions.C Specification
The application can determine the available instance extensions by calling
EnumerateInstanceExtensionProperties:XrResult xrEnumerateInstanceExtensionProperties( const char* layerName, uint32_t propertyCapacityInput, uint32_t* propertyCountOutput, XrExtensionProperties* properties);Description
If
propertiesisNULL, then the number of extensions properties available is returned inpropertyCountOutput. Otherwise,propertyCountInputmust point to a variable set by the user to the number of elements in thepropertiesarray. IfpropertyCountInputis less than the number of extension properties available, the contents ofpropertieswill be undefined. IfpropertyCountInputis smaller than the number of extensions available, the runtime must return the failure codeERROR_SIZE_INSUFFICIENTand the contents ofpropertiesare undefined.Because the list of available layers may change externally between calls to
EnumerateInstanceExtensionProperties, two calls may retrieve different results if alayerNameis 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
layerNameis notNULL,layerNamemust be a null-terminated UTF-8 string propertyCountOutputmust be a pointer to auint32_tvalue- If
propertyCapacityInputis not 0,propertiesmust be a pointer to an array ofpropertyCapacityInputXrExtensionPropertiesstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
layerName- eitherNULLor a pointer to a string naming the API layer to retrieve extensions from, as returned byEnumerateApiLayerProperties.propertyCountOutput- a pointer to the count of properties written, or a pointer to the required capacity in the case thatpropertyCapacityInputis 0.properties- a pointer to an array ofXrExtensionPropertiesstructures, but can beNULLifpropertyCapacityInputis 0.
- If
-
nxrCreateInstance
public static int nxrCreateInstance(long createInfo, long instance)Unsafe version of:CreateInstance
-
xrCreateInstance
public static int xrCreateInstance(XrInstanceCreateInfo createInfo, org.lwjgl.PointerBuffer instance)
Creates an OpenXR Instance.C Specification
The
CreateInstancefunction is defined as:XrResult xrCreateInstance( const XrInstanceCreateInfo* createInfo, XrInstance* instance);Description
CreateInstancecreates theXrInstance, 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 atCreateInstancetime. If a specified API layer cannot be found, noXrInstancewill be created and the function will returnERROR_API_LAYER_NOT_PRESENT. Likewise, if a specified extension cannot be found, the call must returnERROR_EXTENSION_NOT_PRESENTand noXrInstancewill 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,CreateInstancemay returnERROR_LIMIT_REACHED.If the
XrApplicationInfo::applicationNameis the empty string the runtime must returnERROR_NAME_INVALID.If the
XrInstanceCreateInfostructure contains a platform-specific extension for a platform other than the target platform,ERROR_INITIALIZATION_FAILEDmay be returned. If a mandatory platform-specific extension is defined for the target platform but no matching extension struct is provided inXrInstanceCreateInfothe runtime must returnERROR_INITIALIZATION_FAILED.Valid Usage (Implicit)
createInfomust be a pointer to a validXrInstanceCreateInfostructureinstancemust be a pointer to anXrInstancehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
createInfo- points to an instance ofXrInstanceCreateInfocontrolling creation of the instance.instance- points to anXrInstancehandle in which the resulting instance is returned.
-
xrDestroyInstance
public static int xrDestroyInstance(org.lwjgl.openxr.XrInstance instance)
Destroy an instance of OpenXR.C Specification
The
DestroyInstancefunction is defined as:XrResult xrDestroyInstance( XrInstance instance);Parameter Descriptions
instanceis the handle to the instance to destroy.
XrInstancehandles are destroyed usingDestroyInstance. When anXrInstanceis destroyed, all handles that are children of thatXrInstanceare also destroyed.Valid Usage (Implicit)
instancemust be a validXrInstancehandle
Thread Safety
- Access to
instance, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
-
nxrGetInstanceProperties
public static int nxrGetInstanceProperties(org.lwjgl.openxr.XrInstance instance, long instanceProperties)Unsafe version of:GetInstanceProperties
-
xrGetInstanceProperties
public static int xrGetInstanceProperties(org.lwjgl.openxr.XrInstance instance, XrInstanceProperties instanceProperties)Gets information about the instance.C Specification
The
GetInstancePropertiesfunction provides information about the instance and the associated runtime.XrResult xrGetInstanceProperties( XrInstance instance, XrInstanceProperties* instanceProperties);Description
The
instancePropertiesparameter must be filled out by the runtime in response to this call, with information as defined inXrInstanceProperties.Valid Usage (Implicit)
instancemust be a validXrInstancehandleinstancePropertiesmust be a pointer to anXrInstancePropertiesstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- a handle to anXrInstancepreviously created withCreateInstance.instanceProperties- points to anXrInstancePropertieswhich describes theinstance.
-
nxrPollEvent
public static int nxrPollEvent(org.lwjgl.openxr.XrInstance instance, long eventData)Unsafe version of:PollEvent
-
xrPollEvent
public static int xrPollEvent(org.lwjgl.openxr.XrInstance instance, XrEventDataBuffer eventData)Polls for events.C Specification
XrResult xrPollEvent( XrInstance instance, XrEventDataBuffer* eventData);Parameter Descriptions
instanceis a validXrInstance.eventDatais a pointer to a validXrEventDataBuffer.
Valid Usage (Implicit)
instancemust be a validXrInstancehandleeventDatamust be a pointer to anXrEventDataBufferstructure
Return Codes
- On success, this command returns
- On failure, this command returns
The runtime must discard queued events which contain destroyed or otherwise invalid handles.
Event Descriptions
Event Description XrEventDataEventsLostevent queue has overflowed and some events were lost XrEventDataInstanceLossPendingapplication is about to lose the instance XrEventDataInteractionProfileChangedactive input form factor for one or more top level user paths has changed XrEventDataReferenceSpaceChangePendingruntime will begin operating with updated space bounds XrEventDataSessionStateChangedapplication has changed lifecycle state See Also
-
nxrResultToString
public static int nxrResultToString(org.lwjgl.openxr.XrInstance instance, int value, long buffer)Unsafe version of:ResultToString
-
xrResultToString
public static int xrResultToString(org.lwjgl.openxr.XrInstance instance, int value, java.nio.ByteBuffer buffer)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
XrResultvalue 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
XR_SUCCESS) XR_UNKNOWN_SUCCESS_concatenated with the positive result number expressed as a decimal number.XR_UNKNOWN_FAILURE_concatenated with the negative result number expressed as a decimal number.
Valid Usage (Implicit)
instancemust be a validXrInstancehandlevaluemust be a validXrResultvaluebuffermust be a character array of lengthMAX_RESULT_STRING_SIZE
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the handle of the instance to ask for the string.value- theXrResultvalue to turn into a string.buffer- the buffer that will be used to return the string in.
- The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value 0 results in the string
-
nxrStructureTypeToString
public static int nxrStructureTypeToString(org.lwjgl.openxr.XrInstance instance, int value, long buffer)Unsafe version of:StructureTypeToString
-
xrStructureTypeToString
public static int xrStructureTypeToString(org.lwjgl.openxr.XrInstance instance, int value, java.nio.ByteBuffer buffer)Converts an XrStructureType to a UTF-8 string.C Specification
The
StructureTypeToStringfunction is defined as:XrResult xrStructureTypeToString( XrInstance instance, XrStructureType value, char buffer[XR_MAX_STRUCTURE_NAME_SIZE]);Description
Returns the text version of the provided
XrStructureTypevalue 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
TYPE_INSTANCE_CREATE_INFOresults in the stringTYPE_INSTANCE_CREATE_INFO) XR_UNKNOWN_STRUCTURE_TYPE_concatenated with the structure type number expressed as a decimal number.
Valid Usage (Implicit)
instancemust be a validXrInstancehandlevaluemust be a validXrStructureTypevaluebuffermust be a character array of lengthMAX_STRUCTURE_NAME_SIZE
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the handle of the instance to ask for the string.value- theXrStructureTypevalue to turn into a string.buffer- the buffer that will be used to return the string in.
- The literal string defined for the provide numeric value in the core spec or extension. (e.g. the value of
-
nxrGetSystem
public static int nxrGetSystem(org.lwjgl.openxr.XrInstance instance, long getInfo, long systemId)Unsafe version of:GetSystem
-
xrGetSystem
public static int xrGetSystem(org.lwjgl.openxr.XrInstance instance, XrSystemGetInfo getInfo, java.nio.LongBuffer systemId)Gets a system identifier.C Specification
The
GetSystemfunction is defined as:XrResult xrGetSystem( XrInstance instance, const XrSystemGetInfo* getInfo, XrSystemId* systemId);Description
To get an
XrSystemId, an application specifies its desired form factor toGetSystemand gets the runtime’sXrSystemIdassociated with that configuration.If the form factor is supported but temporarily unavailable,
GetSystemmust returnERROR_FORM_FACTOR_UNAVAILABLE. A runtime may returnSUCCESSon a subsequent call for a form factor it previously returnedERROR_FORM_FACTOR_UNAVAILABLE. For example, connecting or warming up hardware might cause an unavailable form factor to become available.Valid Usage (Implicit)
instancemust be a validXrInstancehandlegetInfomust be a pointer to a validXrSystemGetInfostructuresystemIdmust be a pointer to anXrSystemIdvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the handle of the instance from which to get the information.getInfo- a pointer to anXrSystemGetInfostructure containing the application’s requests for a system.systemId- the returnedXrSystemId.
-
nxrGetSystemProperties
public static int nxrGetSystemProperties(org.lwjgl.openxr.XrInstance instance, long systemId, long properties)Unsafe version of:GetSystemProperties
-
xrGetSystemProperties
public static int xrGetSystemProperties(org.lwjgl.openxr.XrInstance instance, long systemId, XrSystemProperties properties)Gets the properties of a particular system.C Specification
The
GetSystemPropertiesfunction is defined as:XrResult xrGetSystemProperties( XrInstance instance, XrSystemId systemId, XrSystemProperties* properties);Description
An application can call
GetSystemPropertiesto retrieve information about the system such as vendor ID, system name, and graphics and tracking properties.Valid Usage (Implicit)
instancemust be a validXrInstancehandlepropertiesmust be a pointer to anXrSystemPropertiesstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the instance from whichsystemIdwas retrieved.systemId- theXrSystemIdwhose properties will be queried.properties- points to an instance of theXrSystemPropertiesstructure, that will be filled with returned information.
-
nxrEnumerateEnvironmentBlendModes
public static int nxrEnumerateEnvironmentBlendModes(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, int environmentBlendModeCapacityInput, long environmentBlendModeCountOutput, long environmentBlendModes)Unsafe version of:EnumerateEnvironmentBlendModes- Parameters:
environmentBlendModeCapacityInput- the capacity of theenvironmentBlendModesarray, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateEnvironmentBlendModes
public static int xrEnumerateEnvironmentBlendModes(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, java.nio.IntBuffer environmentBlendModeCountOutput, @Nullable java.nio.IntBuffer environmentBlendModes)Lists environment blend modes.C Specification
The
EnumerateEnvironmentBlendModesfunction 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
systemIdandviewConfigurationTypefor the lifetime of the instance.Valid Usage (Implicit)
instancemust be a validXrInstancehandleviewConfigurationTypemust be a validXrViewConfigurationTypevalueenvironmentBlendModeCountOutputmust be a pointer to auint32_tvalue- If
environmentBlendModeCapacityInputis not 0,environmentBlendModesmust be a pointer to an array ofenvironmentBlendModeCapacityInputXrEnvironmentBlendModevalues
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance- the instance from whichsystemIdwas retrieved.systemId- theXrSystemIdwhose environment blend modes will be enumerated.viewConfigurationType- theXrViewConfigurationTypeto enumerate.environmentBlendModeCountOutput- a pointer to the count ofenvironmentBlendModeswritten, or a pointer to the required capacity in the case thatenvironmentBlendModeCapacityInputis 0.environmentBlendModes- a pointer to an array ofXrEnvironmentBlendModevalues, but can beNULLifenvironmentBlendModeCapacityInputis 0.
-
nxrCreateSession
public static int nxrCreateSession(org.lwjgl.openxr.XrInstance instance, long createInfo, long session)Unsafe version of:CreateSession
-
xrCreateSession
public static int xrCreateSession(org.lwjgl.openxr.XrInstance instance, XrSessionCreateInfo createInfo, org.lwjgl.PointerBuffer session)Creates an XrSession.C Specification
The
CreateSessionfunction is defined as:XrResult xrCreateSession( XrInstance instance, const XrSessionCreateInfo* createInfo, XrSession* session);Description
Creates a session using the provided
createInfoand returns a handle to that session. This session is created in theSESSION_STATE_IDLEstate, and a correspondingXrEventDataSessionStateChangedevent to theSESSION_STATE_IDLEstate must be generated as the first such event for the new session.The runtime must return
ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING(ERROR_VALIDATION_FAILUREmay be returned due to legacy behavior) on calls toCreateSessionif a function named likexrGet*GraphicsRequirementshas not been called for the sameinstanceandXrSessionCreateInfo::systemId. (See graphics binding extensions for details.)Valid Usage (Implicit)
instancemust be a validXrInstancehandlecreateInfomust be a pointer to a validXrSessionCreateInfostructuresessionmust be a pointer to anXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrExtensionProperties,XrSessionCreateInfo,BeginSession,DestroySession,EndSession- Parameters:
instance- the instance from whichsystemIdwas retrieved.createInfo- a pointer to anXrSessionCreateInfostructure containing information about how to create the session.session- a pointer to a handle in which the createdXrSessionis returned.
-
xrDestroySession
public static int xrDestroySession(XrSession session)
Destroys an XrSession.C Specification
The
DestroySessionfunction is defined as.XrResult xrDestroySession( XrSession session);Description
XrSessionhandles are destroyed usingDestroySession. When anXrSessionis destroyed, all handles that are children of thatXrSessionare also destroyed.The application is responsible for ensuring that it has no calls using
sessionin progress when the session is destroyed.DestroySessioncan be called when the session is in any session state.Valid Usage (Implicit)
sessionmust be a validXrSessionhandle
Thread Safety
- Access to
session, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the session to destroy.
-
nxrEnumerateReferenceSpaces
public static int nxrEnumerateReferenceSpaces(XrSession session, int spaceCapacityInput, long spaceCountOutput, long spaces)
Unsafe version of:EnumerateReferenceSpaces- Parameters:
spaceCapacityInput- the capacity of the spaces array, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateReferenceSpaces
public static int xrEnumerateReferenceSpaces(XrSession session, java.nio.IntBuffer spaceCountOutput, @Nullable java.nio.IntBuffer spaces)
Enumerate available reference spaces.C Specification
The
EnumerateReferenceSpacesfunction 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
CreateReferenceSpacemust succeed for that session, with any transient unavailability of poses expressed later during calls toLocateSpace.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlespaceCountOutputmust be a pointer to auint32_tvalue- If
spaceCapacityInputis not 0,spacesmust be a pointer to an array ofspaceCapacityInputXrReferenceSpaceTypevalues
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.spaceCountOutput- a pointer to the count of spaces written, or a pointer to the required capacity in the case thatspaceCapacityInputis 0.spaces- a pointer to an application-allocated array that will be filled with the enumerant of each supported reference space. It can beNULLifspaceCapacityInputis 0.
-
nxrCreateReferenceSpace
public static int nxrCreateReferenceSpace(XrSession session, long createInfo, long space)
Unsafe version of:CreateReferenceSpace
-
xrCreateReferenceSpace
public static int xrCreateReferenceSpace(XrSession session, XrReferenceSpaceCreateInfo createInfo, org.lwjgl.PointerBuffer space)
Creates a reference space.C Specification
The
CreateReferenceSpacefunction is defined as:XrResult xrCreateReferenceSpace( XrSession session, const XrReferenceSpaceCreateInfo* createInfo, XrSpace* space);Description
Creates an
XrSpacehandle based on a chosen reference space. Application can provide anXrPosefto define the position and orientation of the new space’s origin within the natural reference frame of the reference space.Multiple
XrSpacehandles may exist simultaneously, up to some limit imposed by the runtime. TheXrSpacehandle must be eventually freed via theDestroySpacefunction.The runtime must return
ERROR_REFERENCE_SPACE_UNSUPPORTEDif the given reference space type is not supported by thissession.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrReferenceSpaceCreateInfostructurespacemust be a pointer to anXrSpacehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.createInfo- theXrReferenceSpaceCreateInfoused to specify the space.space- the returned space handle.
-
nxrGetReferenceSpaceBoundsRect
public static int nxrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, long bounds)
Unsafe version of:GetReferenceSpaceBoundsRect
-
xrGetReferenceSpaceBoundsRect
public static int xrGetReferenceSpaceBoundsRect(XrSession session, int referenceSpaceType, XrExtent2Df bounds)
Gets the bounds rectangle of a reference space.C Specification
XR systems may have limited real world spatial ranges in which users can freely move around while remaining tracked. Applications may 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
GetReferenceSpaceBoundsRect.When called,
GetReferenceSpaceBoundsRectshould 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 theXrExtent2Df::widthandXrExtent2Df::heightfields 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 may support boundaries. If a runtime is unable to provide bounds for a given space,SPACE_BOUNDS_UNAVAILABLEwill be returned and all fields ofboundswill be set to 0.The returned extents are expressed relative to the natural origin of the provided
XrReferenceSpaceTypeand must not incorporate any origin offsets specified by the application during calls toCreateReferenceSpace.The runtime must return
ERROR_REFERENCE_SPACE_UNSUPPORTEDif theXrReferenceSpaceTypepassed increateInfois not supported by thissession.When a runtime will begin operating with updated space bounds, the runtime must queue a corresponding
XrEventDataReferenceSpaceChangePendingevent.XrResult xrGetReferenceSpaceBoundsRect( XrSession session, XrReferenceSpaceType referenceSpaceType, XrExtent2Df* bounds);Valid Usage (Implicit)
sessionmust be a validXrSessionhandlereferenceSpaceTypemust be a validXrReferenceSpaceTypevalueboundsmust be a pointer to anXrExtent2Dfstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSessionpreviously created withCreateSession.referenceSpaceType- the reference space type whose bounds should be retrieved.bounds- the returned space extents.
-
nxrCreateActionSpace
public static int nxrCreateActionSpace(XrSession session, long createInfo, long space)
Unsafe version of:CreateActionSpace
-
xrCreateActionSpace
public static int xrCreateActionSpace(XrSession session, XrActionSpaceCreateInfo createInfo, org.lwjgl.PointerBuffer space)
Creates a space based on a pose action.C Specification
The
CreateActionSpacefunction is defined as:XrResult xrCreateActionSpace( XrSession session, const XrActionSpaceCreateInfo* createInfo, XrSpace* space);Description
Creates an
XrSpacehandle based on a chosen pose action. Application can provide anXrPosefto define the position and orientation of the new space’s origin within the natural reference frame of the action space.Multiple
XrSpacehandles may exist simultaneously, up to some limit imposed by the runtime. TheXrSpacehandle must be eventually freed via theDestroySpacefunction or by destroying the parentXrActionhandle.The runtime must return
ERROR_ACTION_TYPE_MISMATCHif the action provided inactionis not of typeACTION_TYPE_POSE_INPUT.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrActionSpaceCreateInfostructurespacemust be a pointer to anXrSpacehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto create the action space in.createInfo- theXrActionSpaceCreateInfoused to specify the space.space- the returned space handle.
-
nxrLocateSpace
public static int nxrLocateSpace(XrSpace space, XrSpace baseSpace, long time, long location)
Unsafe version of:LocateSpace
-
xrLocateSpace
public static int xrLocateSpace(XrSpace space, XrSpace baseSpace, long time, XrSpaceLocation location)
Locates a space with reference to another space.C Specification
LocateSpaceprovides 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
timein 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
timein 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
timeare described in prediction-time-limits. For values oftimeoutside this range,LocateSpacemay return a location with no position andSPACE_LOCATION_POSITION_VALID_BITunset.Some devices improve their understanding of the world as the device is used. The location returned by
LocateSpacefor a givenspace,baseSpaceandtimemay change over time, even for spaces that track static objects, as one or both spaces adjust their origins.During tracking loss of
spacerelative tobaseSpace, runtimes should continue to provide inferred or last-knownpositionandorientationvalues. 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 setSPACE_LOCATION_POSITION_VALID_BITbut it can clearSPACE_LOCATION_POSITION_TRACKED_BITto 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
spaceinbaseSpace(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 andSPACE_LOCATION_POSITION_VALID_BITunset.The runtime must return a location with both
SPACE_LOCATION_POSITION_VALID_BITandSPACE_LOCATION_POSITION_TRACKED_BITset when locatingspaceandbaseSpaceif 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.The runtime should return a location with
SPACE_LOCATION_POSITION_VALID_BITset andSPACE_LOCATION_POSITION_TRACKED_BITunset for spaces tracking two static entities in the world when their relative pose is known to the runtime. This enables applications to make use of the runtime’s latest knowledge of the world, even during tracking loss.If an
XrSpaceVelocitystructure is chained to thenextpointer ofXrSpaceLocationand 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 ofbaseSpaceand set theSPACE_VELOCITY_LINEAR_VALID_BIT. Similarly, if anXrSpaceVelocitystructure is chained to thenextpointer ofXrSpaceLocationand 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 ofbaseSpaceand set theSPACE_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
LocateSpacefunction by chaining anXrSpaceVelocityto the next pointer ofXrSpaceLocationand callingLocateSpace.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)
spacemust be a validXrSpacehandlebaseSpacemust be a validXrSpacehandlelocationmust be a pointer to anXrSpaceLocationstructure- Both of
baseSpaceandspacemust have been created, allocated, or retrieved from the sameXrSession
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
space- identifies the target space to locate.baseSpace- identifies the underlying space in which to locatespace.time- the time for which the location should be provided.location- provides the location ofspaceinbaseSpace.
-
xrDestroySpace
public static int xrDestroySpace(XrSpace space)
Creates a space based on a pose action.C Specification
The
DestroySpacefunction is defined as:XrResult xrDestroySpace( XrSpace space);Description
XrSpacehandles are destroyed usingDestroySpace. The runtime may still use this space if there are active dependencies (e.g, compositions in progress).Valid Usage (Implicit)
spacemust be a validXrSpacehandle
Thread Safety
- Access to
space, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
space- a handle to anXrSpacepreviously created by a function such asCreateReferenceSpace.
-
nxrEnumerateViewConfigurations
public static int nxrEnumerateViewConfigurations(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationsTypeCapacityInput, long viewConfigurationsTypeCountOutput, long viewConfigurationsTypes)Unsafe version of:EnumerateViewConfigurations- Parameters:
viewConfigurationsTypeCapacityInput- the capacity of theviewConfigurationsarray, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateViewConfigurations
public static int xrEnumerateViewConfigurations(org.lwjgl.openxr.XrInstance instance, long systemId, java.nio.IntBuffer viewConfigurationsTypeCountOutput, @Nullable java.nio.IntBuffer viewConfigurationsTypes)Enumerates supported view configurations.C Specification
The
EnumerateViewConfigurationsfunction is defined as:XrResult xrEnumerateViewConfigurations( XrInstance instance, XrSystemId systemId, uint32_t viewConfigurationsTypeCapacityInput, uint32_t* viewConfigurationsTypeCountOutput, XrViewConfigurationType* viewConfigurationsTypes);Description
EnumerateViewConfigurationsenumerates the view configuration types supported by theXrSystemId. The supported set for that system must not change during the lifetime of itsXrInstance. 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
systemIdand for the lifetime of the instance.Valid Usage (Implicit)
instancemust be a validXrInstancehandleviewConfigurationsTypeCountOutputmust be a pointer to auint32_tvalue- If
viewConfigurationsTypeCapacityInputis not 0,viewConfigurationsTypesmust be a pointer to an array ofviewConfigurationsTypeCapacityInputXrViewConfigurationTypevalues
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance- the instance from whichsystemIdwas retrieved.systemId- theXrSystemIdwhose view configurations will be enumerated.viewConfigurationsTypeCountOutput- a pointer to the count ofviewConfigurationswritten, or a pointer to the required capacity in the case thatviewConfigurationsTypeCapacityInputis 0.viewConfigurationsTypes- a pointer to an array ofXrViewConfigurationTypevalues, but can beNULLifviewConfigurationsTypeCapacityInputis 0.
-
nxrGetViewConfigurationProperties
public static int nxrGetViewConfigurationProperties(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, long configurationProperties)Unsafe version of:GetViewConfigurationProperties
-
xrGetViewConfigurationProperties
public static int xrGetViewConfigurationProperties(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, XrViewConfigurationProperties configurationProperties)Gets information for a view configuration.C Specification
The
GetViewConfigurationPropertiesfunction is defined as:XrResult xrGetViewConfigurationProperties( XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties* configurationProperties);Description
GetViewConfigurationPropertiesqueries properties of an individual view configuration. Applications must use one of the supported view configuration types returned byEnumerateViewConfigurations. IfviewConfigurationTypeis not supported by thisXrInstancethe runtime must returnERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.Valid Usage (Implicit)
instancemust be a validXrInstancehandleviewConfigurationTypemust be a validXrViewConfigurationTypevalueconfigurationPropertiesmust be a pointer to anXrViewConfigurationPropertiesstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the instance from whichsystemIdwas retrieved.systemId- theXrSystemIdwhose view configuration is being queried.viewConfigurationType- theXrViewConfigurationTypeof the configuration to get.configurationProperties- a pointer to view configuration properties to return.
-
nxrEnumerateViewConfigurationViews
public static int nxrEnumerateViewConfigurationViews(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, int viewCapacityInput, long viewCountOutput, long views)Unsafe version of:EnumerateViewConfigurationViews- Parameters:
viewCapacityInput- the capacity of theviewsarray, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateViewConfigurationViews
public static int xrEnumerateViewConfigurationViews(org.lwjgl.openxr.XrInstance instance, long systemId, int viewConfigurationType, java.nio.IntBuffer viewCountOutput, @Nullable XrViewConfigurationView.Buffer views)Gets view configuration views.C Specification
The
EnumerateViewConfigurationViewsfunction is defined as:XrResult xrEnumerateViewConfigurationViews( XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t viewCapacityInput, uint32_t* viewCountOutput, XrViewConfigurationView* views);Description
Each
XrViewConfigurationTypedefines the number of views associated with it. Applications can query more details of each view element usingEnumerateViewConfigurationViews. If the suppliedviewConfigurationTypeis not supported by thisXrInstanceandXrSystemId, the runtime must returnERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.Runtimes must always return identical buffer contents from this enumeration for the given
systemIdandviewConfigurationTypefor the lifetime of the instance.Valid Usage (Implicit)
instancemust be a validXrInstancehandleviewConfigurationTypemust be a validXrViewConfigurationTypevalueviewCountOutputmust be a pointer to auint32_tvalue- If
viewCapacityInputis not 0,viewsmust be a pointer to an array ofviewCapacityInputXrViewConfigurationViewstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- the instance from whichsystemIdwas retrieved.systemId- theXrSystemIdwhose view configuration is being queried.viewConfigurationType- theXrViewConfigurationTypeof the configuration to get.viewCountOutput- a pointer to the count ofviewswritten, or a pointer to the required capacity in the case thatviewCapacityInputis 0.views- a pointer to an array ofXrViewConfigurationViewvalues, but can beNULLifviewCapacityInputis 0.
-
nxrEnumerateSwapchainFormats
public static int nxrEnumerateSwapchainFormats(XrSession session, int formatCapacityInput, long formatCountOutput, long formats)
Unsafe version of:EnumerateSwapchainFormats- Parameters:
formatCapacityInput- the capacity of theformats, or 0 to retrieve the required capacity.
-
xrEnumerateSwapchainFormats
public static int xrEnumerateSwapchainFormats(XrSession session, java.nio.IntBuffer formatCountOutput, @Nullable java.nio.LongBuffer formats)
Enumerates swapchain formats.C Specification
The
EnumerateSwapchainFormatsfunction is defined as:XrResult xrEnumerateSwapchainFormats( XrSession session, uint32_t formatCapacityInput, uint32_t* formatCountOutput, int64_t* formats);Description
EnumerateSwapchainFormatsenumerates the texture formats supported by the current session. The type of formats returned are dependent on the graphics API specified inCreateSession. For example, if a DirectX graphics API was specified, then the enumerated formats correspond to the DXGI formats, such asDXGI_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.Runtimes must always return identical buffer contents from this enumeration for the lifetime of the session.
Valid Usage (Implicit)
sessionmust be a validXrSessionhandleformatCountOutputmust be a pointer to auint32_tvalue- If
formatCapacityInputis not 0,formatsmust be a pointer to an array offormatCapacityInputint64_tvalues
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- the session that enumerates the supported formats.formatCountOutput- a pointer to the count ofuint64_tformats written, or a pointer to the required capacity in the case thatformatCapacityInputis 0.formats- a pointer to an array ofint64_tformat ids, but can beNULLifformatCapacityInputis 0. The format ids are specific to the specified graphics API.
-
nxrCreateSwapchain
public static int nxrCreateSwapchain(XrSession session, long createInfo, long swapchain)
Unsafe version of:CreateSwapchain
-
xrCreateSwapchain
public static int xrCreateSwapchain(XrSession session, XrSwapchainCreateInfo createInfo, org.lwjgl.PointerBuffer swapchain)
Creates an XrSwapchain.C Specification
The
CreateSwapchainfunction is defined as:XrResult xrCreateSwapchain( XrSession session, const XrSwapchainCreateInfo* createInfo, XrSwapchain* swapchain);Description
Creates an
XrSwapchainhandle. The returned swapchain handle may be subsequently used in API calls. MultipleXrSwapchainhandles may exist simultaneously, up to some limit imposed by the runtime. TheXrSwapchainhandle must be eventually freed via theDestroySwapchainfunction. The runtime must returnERROR_SWAPCHAIN_FORMAT_UNSUPPORTEDif the image format specified in theXrSwapchainCreateInfois unsupported. The runtime must returnERROR_FEATURE_UNSUPPORTEDif any bit of the create flags specified in theXrSwapchainCreateInfois unsupported.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrSwapchainCreateInfostructureswapchainmust be a pointer to anXrSwapchainhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSwapchainCreateInfo,AcquireSwapchainImage,DestroySwapchain,EnumerateSwapchainFormats,EnumerateSwapchainImages,ReleaseSwapchainImage- Parameters:
session- the session that creates the image.createInfo- a pointer to anXrSwapchainCreateInfostructure containing parameters to be used to create the image.swapchain- a pointer to a handle in which the createdXrSwapchainis returned.
-
xrDestroySwapchain
public static int xrDestroySwapchain(XrSwapchain swapchain)
Destroys an XrSwapchain.C Specification
The
DestroySwapchainfunction is defined as:XrResult xrDestroySwapchain( XrSwapchain swapchain);Description
All submitted graphics API commands that refer to
swapchainmust have completed execution. Runtimes may continue to utilize swapchain images afterDestroySwapchainis called.Valid Usage (Implicit)
swapchainmust be a validXrSwapchainhandle
Thread Safety
- Access to
swapchain, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
swapchain- the swapchain to destroy.
-
nxrEnumerateSwapchainImages
public static int nxrEnumerateSwapchainImages(XrSwapchain swapchain, int imageCapacityInput, long imageCountOutput, long images)
Unsafe version of:EnumerateSwapchainImages- Parameters:
imageCapacityInput- the capacity of theimagesarray, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateSwapchainImages
public static int xrEnumerateSwapchainImages(XrSwapchain swapchain, java.nio.IntBuffer imageCountOutput, @Nullable XrSwapchainImageBaseHeader.Buffer images)
Gets images from an XrSwapchain.C Specification
The
EnumerateSwapchainImagesfunction is defined as:XrResult xrEnumerateSwapchainImages( XrSwapchain swapchain, uint32_t imageCapacityInput, uint32_t* imageCountOutput, XrSwapchainImageBaseHeader* images);Description
Fills an array of graphics API-specific
XrSwapchainImagestructures. The resources must be constant and valid for the lifetime of theXrSwapchain.Runtimes must always return identical buffer contents from this enumeration for the lifetime of the swapchain.
Note:
imagesis a pointer to an array of structures of graphics API-specific type, not an array of structure pointers.The pointer submitted as
imageswill be treated as an array of the expected graphics API-specific type based on the graphics API used at session creation time. If thetypemember of any array element accessed in this way does not match the expected value, the runtime must returnERROR_VALIDATION_FAILURE.Note
Under a typical memory model, a runtime must treat the supplied pointer as an opaque blob beginning with
XrSwapchainImageBaseHeader, until after it has verified thetype.Valid Usage (Implicit)
swapchainmust be a validXrSwapchainhandleimageCountOutputmust be a pointer to auint32_tvalue- If
imageCapacityInputis not 0,imagesmust be a pointer to an array ofimageCapacityInputXrSwapchainImageBaseHeader-based structures. See also:XrSwapchainImageOpenGLESKHR,XrSwapchainImageOpenGLKHR,XrSwapchainImageVulkanKHR
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
swapchain- theXrSwapchainto get images from.imageCountOutput- a pointer to the count ofimageswritten, or a pointer to the required capacity in the case thatimageCapacityInputis 0.images- a pointer to an array of graphics API-specificXrSwapchainImagestructures, all of the same type, based onXrSwapchainImageBaseHeader. It can beNULLifimageCapacityInputis 0.
-
nxrAcquireSwapchainImage
public static int nxrAcquireSwapchainImage(XrSwapchain swapchain, long acquireInfo, long index)
Unsafe version of:AcquireSwapchainImage
-
xrAcquireSwapchainImage
public static int xrAcquireSwapchainImage(XrSwapchain swapchain, @Nullable XrSwapchainImageAcquireInfo acquireInfo, java.nio.IntBuffer index)
Acquire a swapchain image.C Specification
The
AcquireSwapchainImagefunction is defined as:XrResult xrAcquireSwapchainImage( XrSwapchain swapchain, const XrSwapchainImageAcquireInfo* acquireInfo, uint32_t* index);Description
Acquires the image corresponding to the
indexposition in the array returned byEnumerateSwapchainImages. The runtime must returnERROR_CALL_ORDER_INVALIDif the next available index has already been acquired and not yet released withReleaseSwapchainImage. If theswapchainwas created with theSWAPCHAIN_CREATE_STATIC_IMAGE_BITset inXrSwapchainCreateInfo::createFlags, this function must not have been previously called for this swapchain. The runtime must returnERROR_CALL_ORDER_INVALIDif aswapchaincreated with theSWAPCHAIN_CREATE_STATIC_IMAGE_BITset inXrSwapchainCreateInfo::createFlagsand this function has been successfully called previously for this swapchain.Valid Usage (Implicit)
swapchainmust be a validXrSwapchainhandle- If
acquireInfois notNULL,acquireInfomust be a pointer to a validXrSwapchainImageAcquireInfostructure indexmust be a pointer to auint32_tvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSwapchainImageAcquireInfo,CreateSwapchain,DestroySwapchain,EnumerateSwapchainImages,ReleaseSwapchainImage,WaitSwapchainImage- Parameters:
swapchain- the swapchain from which to acquire an image.acquireInfo- exists for extensibility purposes, it isNULLor a pointer to a validXrSwapchainImageAcquireInfo.index- the returned image index that has been acquired.
-
nxrWaitSwapchainImage
public static int nxrWaitSwapchainImage(XrSwapchain swapchain, long waitInfo)
Unsafe version of:WaitSwapchainImage
-
xrWaitSwapchainImage
public static int xrWaitSwapchainImage(XrSwapchain swapchain, XrSwapchainImageWaitInfo waitInfo)
Wait for a swapchain image to be available.C Specification
The
WaitSwapchainImagefunction is defined as:XrResult xrWaitSwapchainImage( XrSwapchain swapchain, const XrSwapchainImageWaitInfo* waitInfo);Description
Before an application can begin 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.
WaitSwapchainImagewill 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
XrSwapchainImageWaitInfodue to scheduling or contention.If the timeout expires without the image becoming available for writing,
TIMEOUT_EXPIREDmust be returned. IfWaitSwapchainImagereturnsTIMEOUT_EXPIRED, the next call toWaitSwapchainImagewill wait on the same image index again until the function succeeds withSUCCESS. Note that this is not an error code;XR_SUCCEEDED({@link #XR_TIMEOUT_EXPIRED TIMEOUT_EXPIRED})istrue.The runtime must eventually relinquish ownership of a swapchain image to the application and must not block indefinitely.
The runtime must return
ERROR_CALL_ORDER_INVALIDif no image has been acquired by callingAcquireSwapchainImage.Valid Usage (Implicit)
swapchainmust be a validXrSwapchainhandlewaitInfomust be a pointer to a validXrSwapchainImageWaitInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSwapchainImageWaitInfo,AcquireSwapchainImage,CreateSwapchain,DestroySwapchain,EnumerateSwapchainImages,ReleaseSwapchainImage- Parameters:
swapchain- the swapchain from which to wait for an image.waitInfo- a pointer to anXrSwapchainImageWaitInfostructure.
-
nxrReleaseSwapchainImage
public static int nxrReleaseSwapchainImage(XrSwapchain swapchain, long releaseInfo)
Unsafe version of:ReleaseSwapchainImage
-
xrReleaseSwapchainImage
public static int xrReleaseSwapchainImage(XrSwapchain swapchain, @Nullable XrSwapchainImageReleaseInfo releaseInfo)
Release a swapchain image.C Specification
The
ReleaseSwapchainImagefunction is defined as:XrResult xrReleaseSwapchainImage( XrSwapchain swapchain, const XrSwapchainImageReleaseInfo* releaseInfo);Description
If the
swapchainwas created with theSWAPCHAIN_CREATE_STATIC_IMAGE_BITset inXrSwapchainCreateInfo::createFlagsstructure, this function must not have been previously called for this swapchain.The runtime must return
ERROR_CALL_ORDER_INVALIDif no image has been waited on by callingWaitSwapchainImage.Valid Usage (Implicit)
swapchainmust be a validXrSwapchainhandle- If
releaseInfois notNULL,releaseInfomust be a pointer to a validXrSwapchainImageReleaseInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSwapchainImageReleaseInfo,AcquireSwapchainImage,CreateSwapchain,DestroySwapchain,EnumerateSwapchainImages,WaitSwapchainImage- Parameters:
swapchain- theXrSwapchainfrom which to release an image.releaseInfo- exists for extensibility purposes, it isNULLor a pointer to a validXrSwapchainImageReleaseInfo.
-
nxrBeginSession
public static int nxrBeginSession(XrSession session, long beginInfo)
Unsafe version of:BeginSession
-
xrBeginSession
public static int xrBeginSession(XrSession session, XrSessionBeginInfo beginInfo)
Begins an XrSession.C Specification
The
BeginSessionfunction is defined as:XrResult xrBeginSession( XrSession session, const XrSessionBeginInfo* beginInfo);Description
When the application receives
XrEventDataSessionStateChangedevent with theSESSION_STATE_READYstate, the application should then callBeginSessionto 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
WaitFrame/BeginFrame/EndFramecalls.If the session is already running when the application calls
BeginSession, the runtime must return errorERROR_SESSION_RUNNING. If the session is not running when the application callsBeginSession, but the session is not yet in theSESSION_STATE_READYstate, the runtime must return errorERROR_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
WaitFramereturns anXrFrameStatewithshouldRenderset 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.
If
primaryViewConfigurationTypeinbeginInfois not supported by theXrSystemIdused to create thesession, the runtime must returnERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlebeginInfomust be a pointer to a validXrSessionBeginInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSessionBeginInfo,CreateSession,DestroySession,EndSession- Parameters:
session- a validXrSessionhandle.beginInfo- a pointer to anXrSessionBeginInfostructure.
-
xrEndSession
public static int xrEndSession(XrSession session)
Ends an XrSession.C Specification
The
EndSessionfunction is defined as:XrResult xrEndSession( XrSession session);Description
When the application receives
XrEventDataSessionStateChangedevent with theSESSION_STATE_STOPPINGstate, the application should stop its frame loop and then callEndSessionto end the running session. This function signals to the runtime that the application will no longer callWaitFrame,BeginFrameorEndFramefrom any thread allowing the runtime to safely transition the session toSESSION_STATE_IDLE. The application must also avoid reading input state or sending haptic output after callingEndSession.If the session is not running when the application calls
EndSession, the runtime must return errorERROR_SESSION_NOT_RUNNING. If the session is still running when the application callsEndSession, but the session is not yet in theSESSION_STATE_STOPPINGstate, the runtime must return errorERROR_SESSION_NOT_STOPPING.If the application wishes to exit a running session, the application can call
RequestExitSessionso that the session transitions fromSESSION_STATE_IDLEtoSESSION_STATE_EXITING.Valid Usage (Implicit)
sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to a runningXrSession.
-
xrRequestExitSession
public static int xrRequestExitSession(XrSession session)
Request to exit a running session.C Specification
When an application wishes to exit a running session, it can call
RequestExitSession, requesting that the runtime transition through the various intermediate session states includingSESSION_STATE_STOPPINGtoSESSION_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
RequestExitSessionis not altered, however explicit session exit may not interact with the platform-specific application lifecycle.The
RequestExitSessionfunction is defined as:XrResult xrRequestExitSession( XrSession session);Description
If
sessionis not running whenRequestExitSessionis called,ERROR_SESSION_NOT_RUNNINGmust be returned.Valid Usage (Implicit)
sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to a runningXrSession.
-
nxrWaitFrame
public static int nxrWaitFrame(XrSession session, long frameWaitInfo, long frameState)
Unsafe version of:WaitFrame
-
xrWaitFrame
public static int xrWaitFrame(XrSession session, @Nullable XrFrameWaitInfo frameWaitInfo, XrFrameState frameState)
Frame timing function.C Specification
The
WaitFramefunction is defined as:XrResult xrWaitFrame( XrSession session, const XrFrameWaitInfo* frameWaitInfo, XrFrameState* frameState);Description
WaitFramethrottles the application frame loop in order to synchronize application frame submissions with the display.WaitFramereturns 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 ofWaitFramein response to feedback from frame submission and completion times inEndFrame. An application must eventually match eachWaitFramecall with one call toBeginFrame. A subsequentWaitFramecall must block until the previous frame has been begun withBeginFrameand must unblock independently of the corresponding call toEndFrame. When less than one frame interval has passed since the previous return fromWaitFrame, the runtime should block until the beginning of the next frame interval. If more than one frame interval has passed since the last return fromWaitFrame, 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
XrFrameState::predictedDisplayTimereturned byWaitFramemust 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.
WaitFramemust be callable from any thread, including a different thread thanBeginFrame/EndFrameare being called from.Calling
WaitFramemust be externally synchronized by the application, concurrent calls may result in undefined behavior.The runtime must return
ERROR_SESSION_NOT_RUNNINGif thesessionis 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
WaitFramemust be called only once per frame.Valid Usage (Implicit)
sessionmust be a validXrSessionhandle- If
frameWaitInfois notNULL,frameWaitInfomust be a pointer to a validXrFrameWaitInfostructure frameStatemust be a pointer to anXrFrameStatestructure
Thread Safety
- Access to the
sessionparameter by any otherWaitFramecall must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a validXrSessionhandle.frameWaitInfo- exists for extensibility purposes, it isNULLor a pointer to a validXrFrameWaitInfo.frameState- a pointer to a validXrFrameState, an output parameter.
-
nxrBeginFrame
public static int nxrBeginFrame(XrSession session, long frameBeginInfo)
Unsafe version of:BeginFrame
-
xrBeginFrame
public static int xrBeginFrame(XrSession session, @Nullable XrFrameBeginInfo frameBeginInfo)
Marks a frame.C Specification
The
BeginFramefunction is defined as:XrResult xrBeginFrame( XrSession session, const XrFrameBeginInfo* frameBeginInfo);Description
BeginFrameis called prior to the start of frame rendering. The application should still callBeginFramebut omit rendering work for the frame ifXrFrameState::shouldRenderisFALSE.Runtimes must not perform frame synchronization or throttling through the
BeginFramefunction and should instead do so throughWaitFrame.The runtime must return the error code
ERROR_CALL_ORDER_INVALIDif there was no corresponding successful call toWaitFrame.The runtime must return the success code
FRAME_DISCARDEDif a priorBeginFramehas been called without an intervening call toEndFrame.The runtime must return
ERROR_SESSION_NOT_RUNNINGif thesessionis not running.Valid Usage (Implicit)
sessionmust be a validXrSessionhandle- If
frameBeginInfois notNULL,frameBeginInfomust be a pointer to a validXrFrameBeginInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a validXrSessionhandle.frameBeginInfo- exists for extensibility purposes, it isNULLor a pointer to a validXrFrameBeginInfo.
-
nxrEndFrame
public static int nxrEndFrame(XrSession session, long frameEndInfo)
Unsafe version of:EndFrame
-
xrEndFrame
public static int xrEndFrame(XrSession session, XrFrameEndInfo frameEndInfo)
Marks a frame.C Specification
The
EndFramefunction is defined as:XrResult xrEndFrame( XrSession session, const XrFrameEndInfo* frameEndInfo);Description
EndFramemay return immediately to the application.XrFrameEndInfo::displayTimeshould be computed using values returned byWaitFrame. The runtime should be robust against variations in the timing of calls toWaitFrame, since a pipelined system may callWaitFrameon a separate thread fromBeginFrameandEndFramewithout 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
EndFramemust be preceded by a successful call toBeginFrame. Failure to do so must result inERROR_CALL_ORDER_INVALIDbeing returned byEndFrame.XrFrameEndInfomay reference swapchains into which the application has rendered for this frame. From eachXrSwapchainonly one image index is implicitly referenced per frame, the one corresponding to the last call toReleaseSwapchainImage. However, a specific swapchain (and by extension a specific swapchain image index) may be referenced inXrFrameEndInfomultiple 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.
ERROR_LAYER_INVALIDmust be returned if an unknown, unsupported layer type, orNULLpointer is passed as one of theXrFrameEndInfo::layers.ERROR_LAYER_INVALIDmust be returned if a layer references a swapchain that has no released swapchain image.ERROR_LAYER_LIMIT_EXCEEDEDmust be returned ifXrFrameEndInfo::layerCount exceedsXrSystemGraphicsProperties::maxLayerCount or if the runtime is unable to composite the specified layers due to resource constraints.ERROR_SWAPCHAIN_RECT_INVALIDmust be returned ifXrFrameEndInfo::layers contains a composition layer which references pixels outside of the associated swapchain image or if negatively sized.ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTEDmust be returned ifXrFrameEndInfo::environmentBlendMode is not supported.ERROR_SESSION_NOT_RUNNINGmust be returned if thesessionis not running.Note
Applications should discard frames for which
EndFramereturns 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)
sessionmust be a validXrSessionhandleframeEndInfomust be a pointer to a validXrFrameEndInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
ERROR_VALIDATION_FAILUREERROR_RUNTIME_FAILUREERROR_HANDLE_INVALIDERROR_INSTANCE_LOSTERROR_SESSION_LOSTERROR_TIME_INVALIDERROR_SWAPCHAIN_RECT_INVALIDERROR_SESSION_NOT_RUNNINGERROR_POSE_INVALIDERROR_LAYER_LIMIT_EXCEEDEDERROR_LAYER_INVALIDERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTEDERROR_CALL_ORDER_INVALID
See Also
- Parameters:
session- a validXrSessionhandle.frameEndInfo- a pointer to a validXrFrameEndInfo.
-
nxrLocateViews
public static int nxrLocateViews(XrSession session, long viewLocateInfo, long viewState, int viewCapacityInput, long viewCountOutput, long views)
Unsafe version of:LocateViews- Parameters:
viewCapacityInput- an input parameter which specifies the capacity of theviewsarray. The required capacity must be same as defined by the correspondingXrViewConfigurationType.
-
xrLocateViews
public static int xrLocateViews(XrSession session, XrViewLocateInfo viewLocateInfo, XrViewState viewState, java.nio.IntBuffer viewCountOutput, @Nullable XrView.Buffer views)
Gets view and projection info.C Specification
The
LocateViewsfunction is defined as:XrResult xrLocateViews( XrSession session, const XrViewLocateInfo* viewLocateInfo, XrViewState* viewState, uint32_t viewCapacityInput, uint32_t* viewCountOutput, XrView* views);Description
The
LocateViewsfunction returns the view and projection info for a particular display time. This time is typically the target display time for a given frame. Repeatedly callingLocateViewswith 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.LocateViewsreturns an array ofXrViewelements, one for each view of the specified view configuration type, along with anXrViewStatecontaining additional state data shared across all views. The eye each view corresponds to is statically defined inXrViewConfigurationTypein case the application wants to apply eye-specific rendering traits. TheXrViewStateandXrViewmember data may change on subsequent calls toLocateViews, and so applications must not assume it to be constant.Valid Usage (Implicit)
sessionmust be a validXrSessionhandleviewLocateInfomust be a pointer to a validXrViewLocateInfostructureviewStatemust be a pointer to anXrViewStatestructureviewCountOutputmust be a pointer to auint32_tvalue- If
viewCapacityInputis not 0,viewsmust be a pointer to an array ofviewCapacityInputXrViewstructures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to the providedXrSession.viewLocateInfo- a pointer to a validXrViewLocateInfostructure.viewState- the output structure with the viewer state information.viewCountOutput- an output parameter which identifies the valid count ofviews.views- an array ofXrView.
-
nxrStringToPath
public static int nxrStringToPath(org.lwjgl.openxr.XrInstance instance, long pathString, long path)Unsafe version of:StringToPath
-
xrStringToPath
public static int xrStringToPath(org.lwjgl.openxr.XrInstance instance, java.nio.ByteBuffer pathString, java.nio.LongBuffer path) public static int xrStringToPath(org.lwjgl.openxr.XrInstance instance, java.lang.CharSequence pathString, java.nio.LongBuffer path)Converts a string to a semantic path.C Specification
The
StringToPathfunction is defined as:XrResult xrStringToPath( XrInstance instance, const char* pathString, XrPath* path);Description
StringToPathretrieves theXrPathvalue for a well-formed path string. If such a value had not yet been assigned by the runtime to the provided path string in thisXrInstance, one must be assigned at this point. All calls to this function with the sameXrInstanceand path string must retrieve the sameXrPathvalue. Upon failure,StringToPathmust return an appropriateXrResult, and may set the output parameter toNULL_PATH. See Path Atom Type for the conditions under which an error may be returned when this function is given a validXrInstanceand a well-formed path string.If the runtime’s resources are exhausted and it cannot create the path, a return value of
ERROR_PATH_COUNT_EXCEEDEDmust be returned. If the application specifies a string that is not a well-formed path string,ERROR_PATH_FORMAT_INVALIDmust be returned.A return value of
SUCCESSfromStringToPathmay 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 retrievedXrPathmaps to the given path string within and during the lifetime of theXrInstancegiven.Valid Usage (Implicit)
instancemust be a validXrInstancehandlepathStringmust be a null-terminated UTF-8 stringpathmust be a pointer to anXrPathvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- an instance previously created.pathString- the path name string to retrieve the associatedXrPathfor.path- the output parameter, which must point to anXrPath. 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.
-
nxrPathToString
public static int nxrPathToString(org.lwjgl.openxr.XrInstance instance, long path, int bufferCapacityInput, long bufferCountOutput, long buffer)Unsafe version of:PathToString- Parameters:
bufferCapacityInput- the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.
-
xrPathToString
public static int xrPathToString(org.lwjgl.openxr.XrInstance instance, long path, java.nio.IntBuffer bufferCountOutput, @Nullable java.nio.ByteBuffer buffer)Converts a semantic path to a string.C Specification
XrResult xrPathToString( XrInstance instance, XrPath path, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer);Description
PathToStringretrieves the path name string associated with anXrPath, in the context of a givenXrInstance, in the form of aNULLterminated string placed into a caller-allocated buffer. Since the mapping between a well-formed path name string and anXrPathis bijective, there will always be exactly one string for each validXrPathvalue. This can be useful if the calling application receives anXrPathvalue that they had not previously retrieved viaStringToPath. During the lifetime of the givenXrInstance, the path name string retrieved by this function for a given validXrPathwill not change. For invalid paths, includingNULL_PATH,ERROR_PATH_INVALIDmust be returned.Valid Usage (Implicit)
instancemust be a validXrInstancehandlebufferCountOutputmust be a pointer to auint32_tvalue- If
bufferCapacityInputis not 0,buffermust be a pointer to an array ofbufferCapacityInputchar values
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- an instance previously created.path- the validXrPathvalue to retrieve the path string for.bufferCountOutput- a pointer to the count of characters written (including the terminating '\0'), or a pointer to the required capacity in the case thatbufferCapacityInputis 0.buffer- a pointer to an application-allocated buffer that will be filled with the semantic path string. It can beNULLifbufferCapacityInputis 0.
-
nxrCreateActionSet
public static int nxrCreateActionSet(org.lwjgl.openxr.XrInstance instance, long createInfo, long actionSet)Unsafe version of:CreateActionSet
-
xrCreateActionSet
public static int xrCreateActionSet(org.lwjgl.openxr.XrInstance instance, XrActionSetCreateInfo createInfo, org.lwjgl.PointerBuffer actionSet)Creates an XrActionSet.C Specification
The
CreateActionSetfunction is defined as:XrResult xrCreateActionSet( XrInstance instance, const XrActionSetCreateInfo* createInfo, XrActionSet* actionSet);Description
The
CreateActionSetfunction creates an action set and returns a handle to the created action set.Valid Usage (Implicit)
instancemust be a validXrInstancehandlecreateInfomust be a pointer to a validXrActionSetCreateInfostructureactionSetmust be a pointer to anXrActionSethandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- a handle to anXrInstance.createInfo- a pointer to a validXrActionSetCreateInfostructure that defines the action set being created.actionSet- a pointer to anXrActionSetwhere the created action set is returned.
-
xrDestroyActionSet
public static int xrDestroyActionSet(XrActionSet actionSet)
Destroys an XrActionSet.C Specification
The
DestroyActionSetfunction is defined as:XrResult xrDestroyActionSet( XrActionSet actionSet);Description
Action set handles can be destroyed by calling
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)
actionSetmust be a validXrActionSethandle
Thread Safety
- Access to
actionSet, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
actionSet- the action set to destroy.
-
nxrCreateAction
public static int nxrCreateAction(XrActionSet actionSet, long createInfo, long action)
Unsafe version of:CreateAction
-
xrCreateAction
public static int xrCreateAction(XrActionSet actionSet, XrActionCreateInfo createInfo, org.lwjgl.PointerBuffer action)
Creates an XrAction.C Specification
The
CreateActionfunction is defined as:XrResult xrCreateAction( XrActionSet actionSet, const XrActionCreateInfo* createInfo, XrAction* action);Description
CreateActioncreates an action and returns its handle.If
actionSethas been included in a call toAttachSessionActionSets, the implementation must returnERROR_ACTIONSETS_ALREADY_ATTACHED.Valid Usage (Implicit)
actionSetmust be a validXrActionSethandlecreateInfomust be a pointer to a validXrActionCreateInfostructureactionmust be a pointer to anXrActionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
ERROR_VALIDATION_FAILUREERROR_RUNTIME_FAILUREERROR_HANDLE_INVALIDERROR_INSTANCE_LOSTERROR_OUT_OF_MEMORYERROR_LIMIT_REACHEDERROR_PATH_UNSUPPORTEDERROR_PATH_INVALIDERROR_PATH_FORMAT_INVALIDERROR_NAME_INVALIDERROR_NAME_DUPLICATEDERROR_LOCALIZED_NAME_INVALIDERROR_LOCALIZED_NAME_DUPLICATEDERROR_ACTIONSETS_ALREADY_ATTACHED
See Also
- Parameters:
actionSet- a handle to anXrActionSet.createInfo- a pointer to a validXrActionCreateInfostructure that defines the action being created.action- a pointer to anXrActionwhere the created action is returned.
-
xrDestroyAction
public static int xrDestroyAction(XrAction action)
Destroys an XrAction.C Specification
The
DestroyActionfunction is defined as:XrResult xrDestroyAction( XrAction action);Description
Action handles can be destroyed by calling
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
DestroyActionis called. Those resources are still used to make action spaces locatable and when processing action priority inSyncActions. 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)
actionmust be a validXrActionhandle
Thread Safety
- Access to
action, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
action- the action to destroy.
-
nxrSuggestInteractionProfileBindings
public static int nxrSuggestInteractionProfileBindings(org.lwjgl.openxr.XrInstance instance, long suggestedBindings)Unsafe version of:SuggestInteractionProfileBindings
-
xrSuggestInteractionProfileBindings
public static int xrSuggestInteractionProfileBindings(org.lwjgl.openxr.XrInstance instance, XrInteractionProfileSuggestedBinding suggestedBindings)Sets the application-suggested bindings for the interaction profile.C Specification
The
SuggestInteractionProfileBindingsfunction is defined as:XrResult xrSuggestInteractionProfileBindings( XrInstance instance, const XrInteractionProfileSuggestedBinding* suggestedBindings);Description
SuggestInteractionProfileBindingssets an interaction profile for which the application can provide default bindings. The application can callSuggestInteractionProfileBindingsonce per interaction profile that it supports.The application can provide any number of bindings for each action.
If the application successfully calls
SuggestInteractionProfileBindingsmore 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 Device input subpaths, the runtime must return
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 returnERROR_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
suggestedBindingsparameter has been included in a call toAttachSessionActionSets, the implementation must returnERROR_ACTIONSETS_ALREADY_ATTACHED.Valid Usage (Implicit)
instancemust be a validXrInstancehandlesuggestedBindingsmust be a pointer to a validXrInteractionProfileSuggestedBindingstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- theXrInstancefor which the application would like to set suggested bindingssuggestedBindings- theXrInteractionProfileSuggestedBindingthat the application would like to set
-
nxrAttachSessionActionSets
public static int nxrAttachSessionActionSets(XrSession session, long attachInfo)
Unsafe version of:AttachSessionActionSets
-
xrAttachSessionActionSets
public static int xrAttachSessionActionSets(XrSession session, XrSessionActionSetsAttachInfo attachInfo)
Attaches action sets to a given session.C Specification
The
AttachSessionActionSetsfunction is defined as:XrResult xrAttachSessionActionSets( XrSession session, const XrSessionActionSetsAttachInfo* attachInfo);Description
AttachSessionActionSetsattaches theXrActionSethandles inattachInfo.actionSetsto thesession. Action sets must be attached in order to be synchronized withSyncActions.When an action set is attached to a session, that action set becomes immutable. See
CreateActionandSuggestInteractionProfileBindingsfor 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
ERROR_ACTIONSET_NOT_ATTACHED.The runtime must return
ERROR_ACTIONSETS_ALREADY_ATTACHEDifAttachSessionActionSetsis called more than once for a givensession.Valid Usage (Implicit)
sessionmust be a validXrSessionhandleattachInfomust be a pointer to a validXrSessionActionSetsAttachInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto attach the action sets to.attachInfo- theXrSessionActionSetsAttachInfoto provide information to attach action sets to the session.
-
nxrGetCurrentInteractionProfile
public static int nxrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, long interactionProfile)
Unsafe version of:GetCurrentInteractionProfile
-
xrGetCurrentInteractionProfile
public static int xrGetCurrentInteractionProfile(XrSession session, long topLevelUserPath, XrInteractionProfileState interactionProfile)
Gets the current interaction profile for a top level user paths.C Specification
The
GetCurrentInteractionProfilefunction is defined as:XrResult xrGetCurrentInteractionProfile( XrSession session, XrPath topLevelUserPath, XrInteractionProfileState* interactionProfile);Description
GetCurrentInteractionProfileasks the runtime for the active interaction profiles for a top level user path.The runtime must return only interaction profiles for which the application has provided bindings with
SuggestInteractionProfileBindingsorNULL_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
AttachSessionActionSetshas not yet been called for thesession, the runtime must returnERROR_ACTIONSET_NOT_ATTACHED. IftopLevelUserPathis not one of the device input subpaths described in section /user paths, the runtime must returnERROR_PATH_UNSUPPORTED.Valid Usage (Implicit)
sessionmust be a validXrSessionhandleinteractionProfilemust be a pointer to anXrInteractionProfileStatestructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionfor which the application would like to retrieve the current interaction profile.topLevelUserPath- the top level user path the application would like to retrieve the interaction profile for.interactionProfile- a pointer to anXrInteractionProfileStatestructure to receive the current interaction profile.
-
nxrGetActionStateBoolean
public static int nxrGetActionStateBoolean(XrSession session, long getInfo, long state)
Unsafe version of:GetActionStateBoolean
-
xrGetActionStateBoolean
public static int xrGetActionStateBoolean(XrSession session, XrActionStateGetInfo getInfo, XrActionStateBoolean state)
Gets boolean action state.C Specification
GetActionStateBooleanretrieves the current state of a boolean action. It is defined as:XrResult xrGetActionStateBoolean( XrSession session, const XrActionStateGetInfo* getInfo, XrActionStateBoolean* state);Valid Usage (Implicit)
sessionmust be a validXrSessionhandlegetInfomust be a pointer to a validXrActionStateGetInfostructurestatemust be a pointer to anXrActionStateBooleanstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto query.getInfo- a pointer toXrActionStateGetInfoto provide action and subaction paths information.state- a pointer to a validXrActionStateBooleaninto which the state will be placed.
-
nxrGetActionStateFloat
public static int nxrGetActionStateFloat(XrSession session, long getInfo, long state)
Unsafe version of:GetActionStateFloat
-
xrGetActionStateFloat
public static int xrGetActionStateFloat(XrSession session, XrActionStateGetInfo getInfo, XrActionStateFloat state)
Gets a floating point action state.C Specification
GetActionStateFloatretrieves the current state of a floating-point action. It is defined as:XrResult xrGetActionStateFloat( XrSession session, const XrActionStateGetInfo* getInfo, XrActionStateFloat* state);Valid Usage (Implicit)
sessionmust be a validXrSessionhandlegetInfomust be a pointer to a validXrActionStateGetInfostructurestatemust be a pointer to anXrActionStateFloatstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto query.getInfo- a pointer toXrActionStateGetInfoto provide action and subaction paths information.state- a pointer to a validXrActionStateFloatinto which the state will be placed.
-
nxrGetActionStateVector2f
public static int nxrGetActionStateVector2f(XrSession session, long getInfo, long state)
Unsafe version of:GetActionStateVector2f
-
xrGetActionStateVector2f
public static int xrGetActionStateVector2f(XrSession session, XrActionStateGetInfo getInfo, XrActionStateVector2f state)
Gets 2D float vector action state.C Specification
GetActionStateVector2fretrieves 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)
sessionmust be a validXrSessionhandlegetInfomust be a pointer to a validXrActionStateGetInfostructurestatemust be a pointer to anXrActionStateVector2fstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto query.getInfo- a pointer toXrActionStateGetInfoto provide action and subaction paths information.state- a pointer to a validXrActionStateVector2finto which the state will be placed.
-
nxrGetActionStatePose
public static int nxrGetActionStatePose(XrSession session, long getInfo, long state)
Unsafe version of:GetActionStatePose
-
xrGetActionStatePose
public static int xrGetActionStatePose(XrSession session, XrActionStateGetInfo getInfo, XrActionStatePose state)
Gets metadata from a pose action.C Specification
The
GetActionStatePosefunction is defined as:XrResult xrGetActionStatePose( XrSession session, const XrActionStateGetInfo* getInfo, XrActionStatePose* state);Description
GetActionStatePosereturns 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 usingCreateActionSpace. Then, after each sync, the application can locate the pose of this action space within a base space usingLocateSpace.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlegetInfomust be a pointer to a validXrActionStateGetInfostructurestatemust be a pointer to anXrActionStatePosestructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrActionStateGetInfo,XrActionStatePose,CreateAction,CreateActionSpace- Parameters:
session- theXrSessionto query.getInfo- a pointer toXrActionStateGetInfoto provide action and subaction paths information.state- a pointer to a validXrActionStatePoseinto which the state will be placed.
-
nxrSyncActions
public static int nxrSyncActions(XrSession session, long syncInfo)
Unsafe version of:SyncActions
-
xrSyncActions
public static int xrSyncActions(XrSession session, XrActionsSyncInfo syncInfo)
Updates the current state of input actions.C Specification
The
SyncActionsfunction is defined as:XrResult xrSyncActions( XrSession session, const XrActionsSyncInfo* syncInfo);Description
SyncActionsupdates the current state of input actions. Repeated input action state queries between subsequent synchronization calls must return the same values. TheXrActionSetstructures referenced in thesyncInfo.activeActionSetsmust have been previously attached to the session viaAttachSessionActionSets. If any action sets not attached to this session are passed toSyncActionsit must returnERROR_ACTIONSET_NOT_ATTACHED. Subsets of the bound action sets can be synchronized in order to control which actions are seen as active.If
sessionis not focused, the runtime must returnSESSION_NOT_FOCUSED, and all action states in the session must be inactive.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlesyncInfomust be a pointer to a validXrActionsSyncInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to theXrSessionthat all provided action set handles belong to.syncInfo- anXrActionsSyncInfoproviding information to synchronize action states.
-
nxrEnumerateBoundSourcesForAction
public static int nxrEnumerateBoundSourcesForAction(XrSession session, long enumerateInfo, int sourceCapacityInput, long sourceCountOutput, long sources)
Unsafe version of:EnumerateBoundSourcesForAction- Parameters:
sourceCapacityInput- the capacity of the array, or 0 to indicate a request to retrieve the required capacity.
-
xrEnumerateBoundSourcesForAction
public static int xrEnumerateBoundSourcesForAction(XrSession session, XrBoundSourcesForActionEnumerateInfo enumerateInfo, java.nio.IntBuffer sourceCountOutput, @Nullable java.nio.LongBuffer sources)
Queries the bound input sources for an action.C Specification
The
EnumerateBoundSourcesForActionfunction is defined as:XrResult xrEnumerateBoundSourcesForAction( XrSession session, const XrBoundSourcesForActionEnumerateInfo* enumerateInfo, uint32_t sourceCapacityInput, uint32_t* sourceCountOutput, XrPath* sources);Description
If an action is unbound,
EnumerateBoundSourcesForActionmust assign 0 to the value pointed-to bysourceCountOutputand not modify the array.EnumerateBoundSourcesForActionmust returnERROR_ACTIONSET_NOT_ATTACHEDif passed an action in an action set never attached to the session withAttachSessionActionSets.As bindings for actions do not change between calls to
SyncActions,EnumerateBoundSourcesForActionmust enumerate the same set of bound sources, or absence of bound sources, for a given query (defined by theenumerateInfoparameter) between any two calls toSyncActions.Valid Usage (Implicit)
sessionmust be a validXrSessionhandleenumerateInfomust be a pointer to a validXrBoundSourcesForActionEnumerateInfostructuresourceCountOutputmust be a pointer to auint32_tvalue- If
sourceCapacityInputis not 0,sourcesmust be a pointer to an array ofsourceCapacityInputXrPathvalues
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionbeing queried.enumerateInfo- anXrBoundSourcesForActionEnumerateInfoproviding the query information.sourceCountOutput- a pointer to the count of sources, or a pointer to the required capacity in the case thatsourceCapacityInputis 0.sources- a pointer to an application-allocated array that will be filled with theXrPathvalues for all sources. It can beNULLifsourceCapacityInputis 0.
-
nxrGetInputSourceLocalizedName
public static int nxrGetInputSourceLocalizedName(XrSession session, long getInfo, int bufferCapacityInput, long bufferCountOutput, long buffer)
Unsafe version of:GetInputSourceLocalizedName- Parameters:
bufferCapacityInput- the capacity of the buffer, or 0 to indicate a request to retrieve the required capacity.
-
xrGetInputSourceLocalizedName
public static int xrGetInputSourceLocalizedName(XrSession session, XrInputSourceLocalizedNameGetInfo getInfo, java.nio.IntBuffer bufferCountOutput, @Nullable java.nio.ByteBuffer buffer)
Gets a localized source name.C Specification
The
GetInputSourceLocalizedNamefunction is defined as:XrResult xrGetInputSourceLocalizedName( XrSession session, const XrInputSourceLocalizedNameGetInfo* getInfo, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer);Description
GetInputSourceLocalizedNamereturns a string for the input source in the current system locale.If
AttachSessionActionSetshas not yet been called for the session, the runtime must returnERROR_ACTIONSET_NOT_ATTACHED.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlegetInfomust be a pointer to a validXrInputSourceLocalizedNameGetInfostructurebufferCountOutputmust be a pointer to auint32_tvalue- If
bufferCapacityInputis not 0,buffermust be a pointer to an array ofbufferCapacityInputchar values
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to theXrSessionassociated with the action that reported this source.getInfo- anXrInputSourceLocalizedNameGetInfoproviding the query information.bufferCountOutput- a pointer to the count of name characters written (including the terminating\0), or a pointer to the required capacity in the case thatbufferCapacityInputis 0.buffer- a pointer to an application-allocated buffer that will be filled with the source name. It can beNULLifbufferCapacityInputis 0.
-
nxrApplyHapticFeedback
public static int nxrApplyHapticFeedback(XrSession session, long hapticActionInfo, long hapticFeedback)
Unsafe version of:ApplyHapticFeedback
-
xrApplyHapticFeedback
public static int xrApplyHapticFeedback(XrSession session, XrHapticActionInfo hapticActionInfo, XrHapticBaseHeader hapticFeedback)
Apply haptic feedback.C Specification
The
ApplyHapticFeedbackfunction is defined as:XrResult xrApplyHapticFeedback( XrSession session, const XrHapticActionInfo* hapticActionInfo, const XrHapticBaseHeader* hapticFeedback);Description
Triggers a haptic event through the specified action of type
TYPE_HAPTIC_VIBRATION. 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
sessionis not focused, the runtime must returnSESSION_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)
sessionmust be a validXrSessionhandlehapticActionInfomust be a pointer to a validXrHapticActionInfostructurehapticFeedbackmust be a pointer to a validXrHapticBaseHeader-based structure. See also:XrHapticVibration
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrHapticActionInfo,XrHapticBaseHeader,XrHapticVibration,StopHapticFeedback- Parameters:
session- theXrSessionto start outputting to.hapticActionInfo- a pointer toXrHapticActionInfoto provide action and subaction paths information.hapticFeedback- a pointer to a haptic event structure which starts with anXrHapticBaseHeader.
-
nxrStopHapticFeedback
public static int nxrStopHapticFeedback(XrSession session, long hapticActionInfo)
Unsafe version of:StopHapticFeedback
-
xrStopHapticFeedback
public static int xrStopHapticFeedback(XrSession session, XrHapticActionInfo hapticActionInfo)
Stop haptic feedback.C Specification
The
StopHapticFeedbackfunction is defined as:XrResult xrStopHapticFeedback( XrSession session, const XrHapticActionInfo* hapticActionInfo);Description
If a haptic event from this
XrActionis in progress, when this function is called the runtime must stop that event.If
sessionis not focused, the runtime must returnSESSION_NOT_FOCUSED.Valid Usage (Implicit)
sessionmust be a validXrSessionhandlehapticActionInfomust be a pointer to a validXrHapticActionInfostructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionto stop outputting to.hapticActionInfo- a pointer to anXrHapticActionInfoto provide action and subaction path information.
-
XR_MAKE_VERSION
public static long XR_MAKE_VERSION(int major, int minor, int patch)Packs a three-component version number into a packed version number integer.This macro can be used when constructing the
XrApplicationInfo::apiVersionparameter passed toCreateInstance.- Parameters:
major- the major version number, packed into the most-significant 16 bitsminor- the minor version number, packed into the second-most-significant group of 16 bitspatch- the patch version number, in the least-significant 32 bits
-
XR_VERSION_MAJOR
public static short XR_VERSION_MAJOR(long version)
Extracts the major version number from a packed version number.- Parameters:
version- a packed version number
-
XR_VERSION_MINOR
public static short XR_VERSION_MINOR(long version)
Extracts the minor version number from a packed version number.- Parameters:
version- a packed version number
-
XR_VERSION_PATCH
public static int XR_VERSION_PATCH(long version)
Extracts the patch version number from a packed version number.- Parameters:
version- a packed version number
-
XR_SUCCEEDED
public static boolean XR_SUCCEEDED(int result)
-
XR_UNQUALIFIED_SUCCESS
public static boolean XR_UNQUALIFIED_SUCCESS(int result)
-
XR_FAILED
public static boolean XR_FAILED(int result)
-
-