10 #include <glm/glm.hpp>
12 #include <VrApi_Types.h>
14 #include "TaskQueue.h"
16 typedef struct ovrMobile ovrMobile;
21 using HandlerTask = std::function<void(VrHandler*)>;
22 using OvrMobileTask = std::function<void(ovrMobile*)>;
23 using OvrJavaTask = std::function<void(
const ovrJava*)>;
24 static void setHandler(VrHandler* handler,
bool noError =
false);
25 static bool withOvrMobile(
const OvrMobileTask& task);
28 static void initVr(
const char* appId =
nullptr);
29 static void shutdownVr();
30 static bool withOvrJava(
const OvrJavaTask& task);
32 uint32_t currentPresentIndex()
const;
33 ovrTracking2 beginFrame();
34 void presentFrame(uint32_t textureId,
const glm::uvec2& size,
const ovrTracking2& tracking)
const;
36 bool vrActive()
const;