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

OpenXR.Core10.Device

Synopsis

Documentation

getSystem Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is the handle of the instance from which to get the information.

instance must be a valid Instance handle

-> SystemGetInfo

getInfo is a pointer to an SystemGetInfo structure containing the application’s requests for a system.

getInfo must be a pointer to a valid SystemGetInfo structure

-> 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

Success
Failure

See Also

NULL_SYSTEM_ID, Instance, SystemGetInfo, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId

getSystemProperties Source #

Arguments

:: forall a io. (Extendss SystemProperties a, PokeChain a, PeekChain a, MonadIO io) 
=> Instance

instance is the instance from which systemId was retrieved.

instance must be a valid Instance handle

-> SystemId

systemId is the https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId whose properties will be queried.

-> 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

Success
Failure

See Also

Instance, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId, SystemProperties

createSession Source #

Arguments

:: forall a io. (Extendss SessionCreateInfo a, PokeChain a, MonadIO io) 
=> Instance

instance is the instance from which systemId was retrieved.

instance must be a valid Instance handle

-> SessionCreateInfo a

createInfo is a pointer to an SessionCreateInfo structure containing information about how to create the session.

createInfo must be a pointer to a valid SessionCreateInfo structure

-> 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

Success
Failure

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.

destroySession Source #

Arguments

:: forall io. MonadIO io 
=> Session

session is the session to destroy.

-> io () 

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)

  • session must be a valid Session handle

Thread Safety

  • Access to session, and any child handles, must be externally synchronized

Return Codes

Success
Failure

See Also

Session, beginSession, createSession, endSession

enumerateEnvironmentBlendModes :: forall io. MonadIO io => Instance -> SystemId -> ViewConfigurationType -> io ("environmentBlendModes" ::: Vector EnvironmentBlendMode) Source #

xrEnumerateEnvironmentBlendModes - Lists environment blend modes

Parameter Descriptions

  • instance is the instance from which systemId was retrieved.
  • systemId is the https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId whose environment blend modes will be enumerated.
  • viewConfigurationType is the ViewConfigurationType to enumerate.
  • environmentBlendModeCapacityInput is the capacity of the environmentBlendModes array, or 0 to indicate a request to retrieve the required capacity.
  • environmentBlendModeCountOutput is a pointer to the count of environmentBlendModes written, or a pointer to the required capacity in the case that environmentBlendModeCapacityInput is 0.
  • environmentBlendModes is a pointer to an array of EnvironmentBlendMode values, but can be NULL if environmentBlendModeCapacityInput is 0.
  • See Buffer Size Parameters chapter for a detailed description of retrieving the required environmentBlendModes size.

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)

  • instance must be a valid Instance handle
  • viewConfigurationType must be a valid ViewConfigurationType value
  • environmentBlendModeCountOutput must be a pointer to a uint32_t value
  • If environmentBlendModeCapacityInput is not 0, environmentBlendModes must be a pointer to an array of environmentBlendModeCapacityInput EnvironmentBlendMode values

Return Codes

Success
Failure

See Also

EnvironmentBlendMode, Instance, https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemId, ViewConfigurationType

newtype SystemId Source #

Constructors

SystemId Word64 

Instances

Instances details
Eq SystemId Source # 
Instance details

Defined in OpenXR.Core10.Device

Ord SystemId Source # 
Instance details

Defined in OpenXR.Core10.Device

Show SystemId Source # 
Instance details

Defined in OpenXR.Core10.Device

Storable SystemId Source # 
Instance details

Defined in OpenXR.Core10.Device

Zero SystemId Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

zero :: SystemId #

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

FormFactor, StructureType, getSystem

Constructors

SystemGetInfo 

Fields

Instances

Instances details
Eq SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

Show SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

Storable SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

Zero SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

zero :: SystemGetInfo #

ToCStruct SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

FromCStruct SystemGetInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

data SystemProperties (es :: [Type]) Source #

Constructors

SystemProperties 

Fields

Instances

Instances details
Extensible SystemProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). SystemProperties es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). SystemProperties ds -> Chain es -> SystemProperties es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends SystemProperties e => b) -> Maybe b Source #

Show (Chain es) => Show (SystemProperties es) Source # 
Instance details

Defined in OpenXR.Core10.Device

es ~ ('[] :: [Type]) => Zero (SystemProperties es) Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

zero :: SystemProperties es #

(Extendss SystemProperties es, PokeChain es) => ToCStruct (SystemProperties es) Source # 
Instance details

Defined in OpenXR.Core10.Device

(Extendss SystemProperties es, PeekChain es) => FromCStruct (SystemProperties es) Source # 
Instance details

Defined in OpenXR.Core10.Device

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

Instances details
Eq SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Show SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Storable SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Zero SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

ToCStruct SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

FromCStruct SystemGraphicsProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

data SystemTrackingProperties Source #

Constructors

SystemTrackingProperties 

Fields

Instances

Instances details
Eq SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Show SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Storable SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

Zero SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

ToCStruct SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

FromCStruct SystemTrackingProperties Source # 
Instance details

Defined in OpenXR.Core10.Device

data SessionCreateInfo (es :: [Type]) Source #

Constructors

SessionCreateInfo 

Fields

Instances

Instances details
Extensible SessionCreateInfo Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). SessionCreateInfo es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). SessionCreateInfo ds -> Chain es -> SessionCreateInfo es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends SessionCreateInfo e => b) -> Maybe b Source #

Show (Chain es) => Show (SessionCreateInfo es) Source # 
Instance details

Defined in OpenXR.Core10.Device

es ~ ('[] :: [Type]) => Zero (SessionCreateInfo es) Source # 
Instance details

Defined in OpenXR.Core10.Device

Methods

zero :: SessionCreateInfo es #

(Extendss SessionCreateInfo es, PokeChain es) => ToCStruct (SessionCreateInfo es) Source # 
Instance details

Defined in OpenXR.Core10.Device

(Extendss SessionCreateInfo es, PeekChain es) => FromCStruct (SessionCreateInfo es) Source # 
Instance details

Defined in OpenXR.Core10.Device