| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
OpenXR.Core10.Device
Synopsis
- getSystem :: forall io. MonadIO io => Instance -> SystemGetInfo -> io SystemId
 - getSystemProperties :: forall a io. (Extendss SystemProperties a, PokeChain a, PeekChain a, MonadIO io) => Instance -> SystemId -> io (SystemProperties a)
 - createSession :: forall a io. (Extendss SessionCreateInfo a, PokeChain a, MonadIO io) => Instance -> SessionCreateInfo a -> io Session
 - withSession :: forall a io r. (Extendss SessionCreateInfo a, PokeChain a, MonadIO io) => Instance -> SessionCreateInfo a -> (io Session -> (Session -> io ()) -> r) -> r
 - destroySession :: forall io. MonadIO io => Session -> io ()
 - enumerateEnvironmentBlendModes :: forall io. MonadIO io => Instance -> SystemId -> ViewConfigurationType -> io ("environmentBlendModes" ::: Vector EnvironmentBlendMode)
 - newtype SystemId = SystemId Word64
 - data SystemGetInfo = SystemGetInfo {}
 - data SystemProperties (es :: [Type]) = SystemProperties {}
 - data SystemGraphicsProperties = SystemGraphicsProperties {}
 - data SystemTrackingProperties = SystemTrackingProperties {}
 - data SessionCreateInfo (es :: [Type]) = SessionCreateInfo {
- next :: Chain es
 - createFlags :: SessionCreateFlags
 - systemId :: SystemId
 
 
Documentation
Arguments
| :: forall io. MonadIO io | |
| => Instance | 
    | 
| -> SystemGetInfo | 
    | 
| -> io SystemId | 
xrGetSystem - Gets a system identifier
Parameter Descriptions
Description
To get an
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 an application specifies its desired
 form factor
 to getSystem and gets the runtime’s
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId
 associated with that configuration.
If the form factor is supported but temporarily unavailable, getSystem
 must return
 ERROR_FORM_FACTOR_UNAVAILABLE. A runtime
 may return SUCCESS on a subsequent call
 for a form factor it previously returned
 ERROR_FORM_FACTOR_UNAVAILABLE. For example,
 connecting or warming up hardware might cause an unavailable form factor
 to become available.
Return Codes
See Also
NULL_SYSTEM_ID,
 Instance, SystemGetInfo,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId
Arguments
| :: forall a io. (Extendss SystemProperties a, PokeChain a, PeekChain a, MonadIO io) | |
| => Instance | 
    | 
| -> SystemId | 
  | 
| -> io (SystemProperties a) | 
xrGetSystemProperties - Gets the properties of a particular system
Parameter Descriptions
Description
An application can call getSystemProperties to retrieve information
 about the system such as vendor ID, system name, and graphics and
 tracking properties.
Return Codes
See Also
Instance,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 SystemProperties
Arguments
| :: forall a io. (Extendss SessionCreateInfo a, PokeChain a, MonadIO io) | |
| => Instance | 
    | 
| -> SessionCreateInfo a | 
    | 
| -> io Session | 
xrCreateSession - Creates an XrSession
Parameter Descriptions
Description
Creates a session using the provided createInfo and returns a handle
 to that session. This session is created in the
 SESSION_STATE_IDLE state, and a
 corresponding EventDataSessionStateChanged
 event to the SESSION_STATE_IDLE state
 must be generated as the first such event for the new session.
Return Codes
See Also
ExtensionProperties,
 Instance, Session,
 SessionCreateFlags,
 SessionCreateInfo, beginSession,
 destroySession, endSession
withSession :: forall a io r. (Extendss SessionCreateInfo a, PokeChain a, MonadIO io) => Instance -> SessionCreateInfo a -> (io Session -> (Session -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
 createSession and destroySession
To ensure that destroySession is always called: pass
 bracket (or the allocate function from your
 favourite resource management library) as the last argument.
 To just extract the pair pass (,) as the last argument.
xrDestroySession - Destroys an XrSession
Parameter Descriptions
Description
Session handles are destroyed using
 destroySession. When an Session is destroyed,
 all handles that are children of that Session
 are also destroyed.
The application is responsible for ensuring that it has no calls using
 session in progress when the session is destroyed.
destroySession can be called when the session is in any session state.
Valid Usage (Implicit)
-  
sessionmust be a validSessionhandle 
Thread Safety
- Access to 
session, and any child handles, must be externally synchronized 
Return Codes
See Also
enumerateEnvironmentBlendModes :: forall io. MonadIO io => Instance -> SystemId -> ViewConfigurationType -> io ("environmentBlendModes" ::: Vector EnvironmentBlendMode) Source #
xrEnumerateEnvironmentBlendModes - Lists environment blend modes
Parameter Descriptions
instanceis the instance from whichsystemIdwas retrieved.
systemIdis the https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId whose environment blend modes will be enumerated.viewConfigurationTypeis theViewConfigurationTypeto enumerate.environmentBlendModeCapacityInputis the capacity of theenvironmentBlendModesarray, or 0 to indicate a request to retrieve the required capacity.environmentBlendModeCountOutputis a pointer to the count ofenvironmentBlendModeswritten, or a pointer to the required capacity in the case thatenvironmentBlendModeCapacityInputis 0.environmentBlendModesis a pointer to an array ofEnvironmentBlendModevalues, but can beNULLifenvironmentBlendModeCapacityInputis 0.- See
     Buffer Size Parameters
     chapter for a detailed description of retrieving the required
     
environmentBlendModessize. 
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 systemId and viewConfigurationType for the
 lifetime of the instance.
Valid Usage (Implicit)
- 
     
instancemust be a validInstancehandle 
- 
     
viewConfigurationTypemust be a validViewConfigurationTypevalue - 
     
environmentBlendModeCountOutputmust be a pointer to auint32_tvalue - 
     If 
environmentBlendModeCapacityInputis not0,environmentBlendModesmust be a pointer to an array ofenvironmentBlendModeCapacityInputEnvironmentBlendModevalues 
Return Codes
See Also
EnvironmentBlendMode,
 Instance,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 ViewConfigurationType
XrSystemId - Identifier for a system
Description
An
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId
 is an opaque atom used by the runtime to identify a system. The value
 NULL_SYSTEM_ID is considered an invalid
 system.
See Also
NULL_SYSTEM_ID, SessionCreateInfo,
 SystemProperties,
 VulkanDeviceCreateInfoKHR,
 VulkanGraphicsDeviceGetInfoKHR,
 VulkanInstanceCreateInfoKHR,
 enumerateEnvironmentBlendModes,
 enumerateViewConfigurationViews,
 enumerateViewConfigurations,
 getD3D11GraphicsRequirementsKHR,
 getD3D12GraphicsRequirementsKHR,
 getOpenGLESGraphicsRequirementsKHR,
 getOpenGLGraphicsRequirementsKHR,
 getSystem, getSystemProperties,
 getViewConfigurationProperties,
 getVulkanDeviceExtensionsKHR,
 getVulkanGraphicsDeviceKHR,
 getVulkanGraphicsRequirements2KHR,
 getVulkanGraphicsRequirementsKHR,
 getVulkanInstanceExtensionsKHR
Instances
| Eq SystemId Source # | |
| Ord SystemId Source # | |
Defined in OpenXR.Core10.Device  | |
| Show SystemId Source # | |
| Storable SystemId Source # | |
Defined in OpenXR.Core10.Device  | |
| Zero SystemId Source # | |
Defined in OpenXR.Core10.Device  | |
data SystemGetInfo Source #
XrSystemGetInfo - Specifies desired attributes of the system
Member Descriptions
Description
The SystemGetInfo structure specifies attributes about a system as
 desired by an application.
Valid Usage (Implicit)
See Also
Constructors
| SystemGetInfo | |
Fields 
  | |
Instances
data SystemProperties (es :: [Type]) Source #
XrSystemProperties - Properties of a particular system
Valid Usage (Implicit)
See Also
StructureType,
 SystemGraphicsProperties,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 SystemTrackingProperties, getSystem, getSystemProperties
Constructors
| SystemProperties | |
Fields 
  | |
Instances
data SystemGraphicsProperties Source #
XrSystemGraphicsProperties - Graphics-related properties of a particular system
Member Descriptions
See Also
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 SystemProperties, SystemTrackingProperties, getSystem,
 getSystemProperties
Constructors
| SystemGraphicsProperties | |
Fields 
  | |
Instances
data SystemTrackingProperties Source #
XrSystemTrackingProperties - Tracking-related properties of a particular system
Member Descriptions
See Also
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrBool32,
 SystemGraphicsProperties,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 SystemProperties, getSystem, getSystemProperties
Constructors
| SystemTrackingProperties | |
Fields  | |
Instances
data SessionCreateInfo (es :: [Type]) Source #
XrSessionCreateInfo - Creates a session
Valid Usage (Implicit)
See Also
SessionCreateFlags,
 StructureType,
 https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId,
 createSession
Constructors
| SessionCreateInfo | |
Fields 
  | |