8 #ifndef META_OCEAN_PLATFORM_OPENXR_SESSION_H
9 #define META_OCEAN_PLATFORM_OPENXR_SESSION_H
31 class OCEAN_PLATFORM_OPENXR_EXPORT
Session final
66 inline bool initialize(
const Instance& instance,
const void* xrGraphicsBinding,
const unsigned int width,
const unsigned int height);
77 bool initialize(
const XrInstance& xrInstance,
const XrSystemId& xrSystemId,
const void* xrGraphicsBinding,
const unsigned int width,
const unsigned int height);
93 bool begin(
const XrViewConfigurationType xrViewConfigurationType);
107 inline bool isRunning()
const;
113 inline unsigned int width()
const;
119 inline unsigned int height()
const;
126 inline ScopedXrSpace createSpace(
const XrReferenceSpaceType xrReferenceSpaceType)
const;
134 inline ScopedXrSpace createActionSpace(
const XrAction& xrAction,
const XrPath& xrSubactionPath = XR_NULL_PATH)
const;
142 inline ScopedXrSpace createActionSpace(
const XrAction& xrAction,
const std::string& subactionPath)
const;
150 bool nextFrame(XrTime& predictedDisplayTime, XrDuration* predictedDisplayPeriod =
nullptr);
158 inline bool setColorSpace(
const XrColorSpaceFB xrColorSpaceFB);
171 inline XrInstance xrInstance()
const;
177 inline XrSystemId xrSystemId()
const;
198 operator XrSession()
const;
205 explicit inline operator bool()
const;
214 static ScopedXrSpace createSpace(
const XrInstance& xrInstance,
const XrSession& xrSession,
const XrReferenceSpaceType xrReferenceSpaceType);
224 static ScopedXrSpace createActionSpace(
const XrInstance& xrInstance,
const XrSession& xrSession,
const XrAction& xrAction,
const XrPath& xrSubactionPath = XR_NULL_PATH);
234 static inline ScopedXrSpace createActionSpace(
const XrInstance& xrInstance,
const XrSession& xrSession,
const XrAction& xrAction,
const std::string& subactionPath);
254 static bool setColorSpace(
const XrInstance& xrInstance,
const XrSession& xrSession,
const XrColorSpaceFB xrColorSpaceFB);
272 XrInstance xrInstance_ = XR_NULL_HANDLE;
275 XrSession xrSession_ = XR_NULL_HANDLE;
278 XrSystemId xrSystemId_ = XR_NULL_SYSTEM_ID;
281 bool isRunning_ =
false;
284 unsigned int width_ = 0u;
287 unsigned int height_ = 0u;
295 *
this = std::move(session);
300 ocean_assert(instance.
isValid());
301 ocean_assert(xrGraphicsBinding !=
nullptr);
373 inline Session::operator bool()
const
This class implements a recursive lock object.
Definition: Lock.h:31
This class implements a scoped lock object for recursive lock objects.
Definition: Lock.h:135
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15