9 #ifndef GlobeEngine_VRExampleEngine_h
10 #define GlobeEngine_VRExampleEngine_h
17 #include "OpenGL_Includes.h"
53 void resize(
int _w,
int _h);
59 void drawFrame(std::shared_ptr<ge::Camera> _cam,
62 std::string
getTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice, vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError = NULL);
72 void nextModel() { currentModel = (currentModel + 1) % pointclouds.size(); }
74 void nextRenderMode() { currentRenderMode = RenderMode( (currentRenderMode + 1) % (both + 1) ); }
77 std::shared_ptr<ge::Shader> programForUtilities;
78 std::shared_ptr<ge::Shader> programForDebug;
79 std::shared_ptr<ge::Shader> programForPointClouds;
80 std::shared_ptr<ge::Shader> programForMeshes;
83 enum RenderMode { cloud, both };
85 RenderMode currentRenderMode;
87 std::vector<std::shared_ptr<geData::PointCloud>> pointclouds;
88 std::vector<std::shared_ptr<geData::Mesh>> meshes;
100 vr::IVRRenderModels* renderModels;
101 std::string driverString;
102 std::string displayString;
103 std::string modelString;
104 vr::TrackedDevicePose_t trackedDevicePose[vr::k_unMaxTrackedDeviceCount];
105 vmml::Matrix4f m_rmat4DevicePose[vr::k_unMaxTrackedDeviceCount];
106 bool showTrackedDevice[vr::k_unMaxTrackedDeviceCount];
109 int iValidPoseCount_Last;
110 std::string poseClassesString;
111 char devClassChar[vr::k_unMaxTrackedDeviceCount];
114 vmml::Matrix4f mat4HMDPose;
115 vmml::Matrix4f mat4eyePosLeft;
116 vmml::Matrix4f mat4eyePosRight;
118 vmml::Matrix4f projLeft;
119 vmml::Matrix4f projRight;
121 bool debugMapsEnabled;
122 bool debugWithoutVive;
124 unsigned int screenWidth;
125 unsigned int screenHeight;
void updateHMDMatrixPose()
Definition: VRExampleEngine.cpp:581
bool initVRCompositor()
Definition: VRExampleEngine.cpp:442
void setDebugMapsEnabled(bool _in)
Definition: VRExampleEngine.cpp:420
void destroy()
Definition: VRExampleEngine.cpp:30
void nextRenderMode()
Definition: VRExampleEngine.h:74
Definition: MemoryState.h:16
void updateFramebufferStandardID()
Definition: VRExampleEngine.cpp:413
void create()
Definition: VRExampleEngine.cpp:35
void resize(int _w, int _h)
Definition: VRExampleEngine.cpp:410
Definition: DebugMap.h:18
void nextModel()
Definition: VRExampleEngine.h:72
Definition: DebugLogger.h:22
std::string getTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice, vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError=NULL)
Definition: VRExampleEngine.cpp:429
VRExampleEngine()
Definition: VRExampleEngine.cpp:9
Definition: FrameBufferObject.h:20
Definition: overlaywidget.h:10
void drawScene()
Definition: VRExampleEngine.cpp:326
void drawFrame(std::shared_ptr< ge::Camera > _cam, vr::Hmd_Eye nEye)
Definition: VRExampleEngine.cpp:366
void clear()
Definition: VRExampleEngine.cpp:17
void setupRenderModelForTrackedDevice(vr::TrackedDeviceIndex_t unTrackedDeviceIndex)
Definition: VRExampleEngine.cpp:472
void shutdown()
Definition: VRExampleEngine.cpp:452
void initializeScene(std::string _projectsrcPath=0)
Definition: VRExampleEngine.cpp:40
Definition: VRExampleEngine.h:39
~VRExampleEngine()
Definition: VRExampleEngine.cpp:13
Definition: SceneStateSet.h:41
void update()
Definition: VRExampleEngine.cpp:279
vmml::Vector2ui getStereoRenderTargets()
Definition: VRExampleEngine.cpp:462
vmml::Matrix4f getHMDMatrixPoseEye(vr::Hmd_Eye nEye)
Definition: VRExampleEngine.cpp:566
vmml::Matrix4f VRExampleEngine::getCurrentViewProjectionMatrix(vr::Hmd_Eye nEye)
vmml::Matrix4f getHMDMatrixProjectionEye(vr::Hmd_Eye nEye, float _nearClipPlane, float _farClipPlane)
Definition: VRExampleEngine.cpp:552