openxr-0.1: Bindings to the OpenXR API
Safe HaskellNone
LanguageHaskell2010

OpenXR.Extensions.Handles

Synopsis

Documentation

data DebugUtilsMessengerEXT_T Source #

An opaque type for representing pointers to XrDebugUtilsMessengerEXT handles

data SpatialAnchorMSFT Source #

XrSpatialAnchorMSFT - Represents a spatial anchor

Description

Spatial anchors are often used in combination with an UNBOUNDED_MSFT reference space. UNBOUNDED_MSFT reference spaces adjust their origin as necessary to keep the viewer’s coordinates relative to the space’s origin stable. Such adjustments maintain the visual stability of content currently near the viewer, but may cause content placed far from the viewer to drift in its alignment to the real world by the time the user moves close again. By creating an SpatialAnchorMSFT where a piece of content is placed and then always rendering that content relative to its anchor’s space, an application can ensure that each piece of content stays at a fixed location in the environment.

See Also

SpatialAnchorSpaceCreateInfoMSFT, createSpatialAnchorFromPerceptionAnchorMSFT, createSpatialAnchorMSFT, destroySpatialAnchorMSFT, tryGetPerceptionAnchorFromSpatialAnchorMSFT

data SpatialAnchorMSFT_T Source #

An opaque type for representing pointers to XrSpatialAnchorMSFT handles

data HandTrackerEXT Source #

XrHandTrackerEXT - Represents a tracker for a hand joints.

Description

An application creates separate HandTrackerEXT handles for left and right hands. This handle can be used to locate hand joints using locateHandJointsEXT function.

A hand tracker provides accurate fidelity to the user’s actual hand shape. When the hand tracking input requires the user to be holding a controller in their hand, the hand tracking input will appear as the user holding the controller. This input can be used to render the hand shape together with rendering the controller in the hand.

See Also

createHandMeshSpaceMSFT, createHandTrackerEXT, destroyHandTrackerEXT, locateHandJointsEXT, updateHandMeshMSFT

data HandTrackerEXT_T Source #

An opaque type for representing pointers to XrHandTrackerEXT handles

data Instance Source #

XrInstance - Opaque handle to an instance object

Description

An OpenXR instance is an object that allows an OpenXR application to communicate with an OpenXR runtime. The application accomplishes this communication by calling createInstance and receiving a handle to the resulting Instance object.

The Instance object stores and tracks OpenXR-related application state, without storing any such state in the application’s global address space. This allows the application to create multiple instances as well as safely encapsulate the application’s OpenXR state since this object is opaque to the application. OpenXR runtimes may limit the number of simultaneous Instance objects that may be created and used, but they must support the creation and usage of at least one Instance object per process.

Physically, this state may be stored in any of the OpenXR loader, OpenXR API layers or the OpenXR runtime components. The exact storage and distribution of this saved state is implementation-dependent, except where indicated by this specification.

See Also

InstanceCreateInfo, InstanceProperties, convertTimeToTimespecTimeKHR, convertTimeToWin32PerformanceCounterKHR, convertTimespecTimeToTimeKHR, convertWin32PerformanceCounterToTimeKHR, createActionSet, createDebugUtilsMessengerEXT, createInstance, createSession, createVulkanDeviceKHR, createVulkanInstanceKHR, destroyInstance, enumerateEnvironmentBlendModes, enumerateViewConfigurationViews, enumerateViewConfigurations, getD3D11GraphicsRequirementsKHR, getD3D12GraphicsRequirementsKHR, getInstanceProcAddr, getInstanceProperties, getOpenGLESGraphicsRequirementsKHR, getOpenGLGraphicsRequirementsKHR, getSystem, getSystemProperties, getViewConfigurationProperties, getVulkanDeviceExtensionsKHR, getVulkanGraphicsDevice2KHR, getVulkanGraphicsDeviceKHR, getVulkanGraphicsRequirements2KHR, getVulkanGraphicsRequirementsKHR, getVulkanInstanceExtensionsKHR, pathToString, pollEvent, resultToString, setDebugUtilsObjectNameEXT, stringToPath, structureTypeToString, submitDebugUtilsMessageEXT, suggestInteractionProfileBindings

Instances

Instances details
Eq Instance Source # 
Instance details

Defined in OpenXR.Core10.Handles

Show Instance Source # 
Instance details

Defined in OpenXR.Core10.Handles

Zero Instance Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

zero :: Instance #

HasObjectType Instance Source # 
Instance details

Defined in OpenXR.Core10.Handles

IsHandle Instance Source # 
Instance details

Defined in OpenXR.Core10.Handles

data Session Source #

XrSession - Opaque handle to a session object

Description

A session represents an application’s intention to display XR content to the user.

First, the application creates a session by choosing a system and a graphics API and calling createSession, which creates a session in the SESSION_STATE_IDLE state. The application then sets up an pollEvent loop to monitor for session state changes delivered through the EventDataSessionStateChanged event. When the runtime determines that the system is ready to start transitioning to this session’s XR content, it notifies the application that its session has moved into the SESSION_STATE_READY state. When the application is ready to proceed and display its XR content, it calls beginSession and starts its frame loop, which starts its session running. While the session is running, the application is expected to continuously run its frame loop by calling waitFrame, beginFrame and endFrame each frame, to establish synchronization with the runtime. Once the runtime is synchronized with the application’s frame loop and ready to display its frames, the session will move into the SESSION_STATE_SYNCHRONIZED state. For frames where waitFrame returns an FrameState with shouldRender set to true, the application should render its composition layers and submit them to endFrame. If the application desires to leave a running session, it should call the requestExitSession function to request that the runtime transition its session to the SESSION_STATE_STOPPING state as soon as possible. Once the application reaches the SESSION_STATE_STOPPING state, it can call endSession to stop the XR session, after which the session will transition through SESSION_STATE_IDLE to the SESSION_STATE_EXITING state.

A session is considered running after a successful call to beginSession and remains running until any call is made to endSession. Certain functions are only valid to call when a session is running, such as waitFrame, or else the ERROR_SESSION_NOT_RUNNING error must be returned by the runtime.

A session is considered not running before a successful call to beginSession and becomes not running again after any call is made to endSession. Certain functions are only valid to call when a session is not running, such as beginSession, or else the ERROR_SESSION_RUNNING error must be returned by the runtime.

If an error is returned from beginSession, the session remains in its current running or not running state. Calling endSession always transitions a session to the not running state, regardless of any errors returned.

Only running sessions may become focused sessions that receive XR input. When a session is not running, the application must not submit frames. This is important because without a running session, the runtime no longer has to spend resources on sub-systems (tracking etc.) that are no longer needed by the application.

See Also

EventDataInteractionProfileChanged, EventDataReferenceSpaceChangePending, EventDataSessionStateChanged, EventDataVisibilityMaskChangedKHR, applyHapticFeedback, attachSessionActionSets, beginFrame, beginSession, createActionSpace, createHandTrackerEXT, createReferenceSpace, createSession, createSpatialAnchorFromPerceptionAnchorMSFT, createSpatialAnchorMSFT, createSpatialAnchorSpaceMSFT, createSpatialGraphNodeSpaceMSFT, createSwapchain, createSwapchainAndroidSurfaceKHR, destroySession, endFrame, endSession, enumerateBoundSourcesForAction, enumerateColorSpacesFB, enumerateDisplayRefreshRatesFB, enumerateReferenceSpaces, enumerateSwapchainFormats, getActionStateBoolean, getActionStateFloat, getActionStatePose, getActionStateVector2f, getControllerModelKeyMSFT, getControllerModelPropertiesMSFT, getControllerModelStateMSFT, getCurrentInteractionProfile, getDisplayRefreshRateFB, getInputSourceLocalizedName, getReferenceSpaceBoundsRect, getVisibilityMaskKHR, loadControllerModelMSFT, locateViews, perfSettingsSetPerformanceLevelEXT, requestDisplayRefreshRateFB, requestExitSession, sessionBeginDebugUtilsLabelRegionEXT, sessionEndDebugUtilsLabelRegionEXT, sessionInsertDebugUtilsLabelEXT, setAndroidApplicationThreadKHR, setColorSpaceFB, xrSetInputDeviceActiveEXT, xrSetInputDeviceLocationEXT, xrSetInputDeviceStateBoolEXT, xrSetInputDeviceStateFloatEXT, xrSetInputDeviceStateVector2fEXT, stopHapticFeedback, syncActions, thermalGetTemperatureTrendEXT, tryGetPerceptionAnchorFromSpatialAnchorMSFT, waitFrame

Instances

Instances details
Eq Session Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

(==) :: Session -> Session -> Bool #

(/=) :: Session -> Session -> Bool #

Show Session Source # 
Instance details

Defined in OpenXR.Core10.Handles

Zero Session Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

zero :: Session #

HasObjectType Session Source # 
Instance details

Defined in OpenXR.Core10.Handles

IsHandle Session Source # 
Instance details

Defined in OpenXR.Core10.Handles

data Action Source #

XrAction - Opaque handle to an action

Description

Action handles are used to refer to individual actions when retrieving action data, creating action spaces, or sending haptic events.

See Also

ActionSpaceCreateInfo, ActionStateGetInfo, ActionSuggestedBinding, ActionType, BoundSourcesForActionEnumerateInfo, HapticActionInfo, InteractionProfileAnalogThresholdVALVE, createAction, destroyAction

Instances

Instances details
Eq Action Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

(==) :: Action -> Action -> Bool #

(/=) :: Action -> Action -> Bool #

Show Action Source # 
Instance details

Defined in OpenXR.Core10.Handles

Zero Action Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

zero :: Action #

HasObjectType Action Source # 
Instance details

Defined in OpenXR.Core10.Handles

IsHandle Action Source # 
Instance details

Defined in OpenXR.Core10.Handles

data Swapchain Source #

XrSwapchain - Opaque handle to a swapchain object

Description

Normal XR applications will want to present rendered images to the user. To allow this, the runtime provides images organized in swapchains for the application to render into. The runtime must allow applications to create multiple swapchains.

Swapchain image format support by the runtime is specified by the enumerateSwapchainFormats function. Runtimes should support R8G8B8A8 and R8G8B8A8 sRGB formats if possible.

Swapchain images can be 2D or 2D Array.

Rendering operations involving composition of submitted layers should be assumed to be internally performed by the runtime in linear color space. Images submitted in sRGB color space must be created using an API-specific sRGB format (e.g. DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, GL_SRGB8_ALPHA8, VK_FORMAT_R8G8B8A8_SRGB) to apply automatic sRGB-to-linear conversion when read by the runtime. All other formats will be treated as linear values.

Note

OpenXR applications should avoid submitting linear encoded 8 bit color data (e.g. DXGI_FORMAT_R8G8B8A8_UNORM) whenever possible as it may result in color banding.

Gritz, L. and d’Eon, E. 2007. The Importance of Being Linear. In: H. Nguyen, ed., GPU Gems 3. Addison-Wesley Professional. https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-24-importance-being-linear

Note

DXGI resources will be created with their associated TYPELESS format, but the runtime will use the application-specified format for reading the data.

See Also

CompositionLayerCubeKHR, SwapchainSubImage, acquireSwapchainImage, createSwapchain, createSwapchainAndroidSurfaceKHR, destroySwapchain, enumerateSwapchainFormats, enumerateSwapchainImages, releaseSwapchainImage, waitSwapchainImage

Instances

Instances details
Eq Swapchain Source # 
Instance details

Defined in OpenXR.Core10.Handles

Show Swapchain Source # 
Instance details

Defined in OpenXR.Core10.Handles

Zero Swapchain Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

zero :: Swapchain #

HasObjectType Swapchain Source # 
Instance details

Defined in OpenXR.Core10.Handles

IsHandle Swapchain Source # 
Instance details

Defined in OpenXR.Core10.Handles

data Space Source #

XrSpace - Opaque handle to a space

Description

Spaces are represented by Space handles, which the application creates and then uses in API calls. Whenever an application calls a function that returns coordinates, it provides an Space to specify the frame of reference in which those coordinates will be expressed. Similarly, when providing coordinates to a function, the application specifies which Space the runtime should use to interpret those coordinates.

OpenXR defines a set of well-known reference spaces that applications use to bootstrap their spatial reasoning. These reference spaces are: VIEW, LOCAL and STAGE. Each reference space has a well-defined meaning, which establishes where its origin is positioned and how its axes are oriented.

Runtimes whose tracking systems improve their understanding of the world over time may track spaces independently. For example, even though a LOCAL space and a STAGE space each map their origin to a static position in the world, a runtime with an inside-out tracking system may introduce slight adjustments to the origin of each space on a continuous basis to keep each origin in place.

Beyond well-known reference spaces, runtimes expose other independently-tracked spaces, such as a pose action space that tracks the pose of a motion controller over time.

When one or both spaces are tracking a dynamic object, passing in an updated time to locateSpace each frame will result in an updated relative pose. For example, the location of the left hand’s pose action space in the STAGE reference space will change each frame as the user’s hand moves relative to the stage’s predefined origin on the floor. In other XR APIs, it is common to report the "pose" of an object relative to some presumed underlying global space. This API is careful to not explicitly define such an underlying global space, because it does not apply to all systems. Some systems will support no STAGE space, while others may support a STAGE space that switches between various physical stages with dynamic availability. To satisfy this wide variability, "poses" are always described as the relationship between two spaces.

Some devices improve their understanding of the world as the device is used. The location returned by locateSpace in later frames may change over time, even for spaces that track static objects, as either the target space or base space adjusts its origin.

Composition layers submitted by the application include an Space for the runtime to use to position that layer over time. Composition layers whose Space is relative to the VIEW reference space are implicitly "head-locked", even if they may not be "display-locked" for non-head-mounted form factors.

See Also

ActionSpaceCreateInfo, CompositionLayerBaseHeader, CompositionLayerCubeKHR, CompositionLayerCylinderKHR, CompositionLayerEquirect2KHR, CompositionLayerEquirectKHR, CompositionLayerProjection, CompositionLayerQuad, HandJointsLocateInfoEXT, ReferenceSpaceCreateInfo, SpatialAnchorCreateInfoMSFT, ViewLocateInfo, createActionSpace, createHandMeshSpaceMSFT, createReferenceSpace, createSpatialAnchorSpaceMSFT, createSpatialGraphNodeSpaceMSFT, destroySpace, locateSpace, xrSetInputDeviceLocationEXT

Instances

Instances details
Eq Space Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

(==) :: Space -> Space -> Bool #

(/=) :: Space -> Space -> Bool #

Show Space Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

Zero Space Source # 
Instance details

Defined in OpenXR.Core10.Handles

Methods

zero :: Space #

HasObjectType Space Source # 
Instance details

Defined in OpenXR.Core10.Handles

IsHandle Space Source # 
Instance details

Defined in OpenXR.Core10.Handles