52 #include "Extras/OVR_Math.h"
53 #include "OVR_CAPI_0_8_0.h"
54 #include "OVR_CAPI_GL.h"
92 inline cTransform cOVRConvert(OVR::Matrix4f a_matrix)
95 result(0, 0) = a_matrix.M[0][0]; result(0, 1) = a_matrix.M[0][1]; result(0, 2) = a_matrix.M[0][2]; result(0, 3) = a_matrix.M[0][3];
96 result(1, 0) = a_matrix.M[1][0]; result(1, 1) = a_matrix.M[1][1]; result(1, 2) = a_matrix.M[1][2]; result(1, 3) = a_matrix.M[1][3];
97 result(2, 0) = a_matrix.M[2][0]; result(2, 1) = a_matrix.M[2][1]; result(2, 2) = a_matrix.M[2][2]; result(2, 3) = a_matrix.M[2][3];
98 result(3, 0) = a_matrix.M[3][0]; result(3, 1) = a_matrix.M[3][1]; result(3, 2) = a_matrix.M[3][2]; result(3, 3) = a_matrix.M[3][3];
152 void blitMirror(ovrEyeType numEyes=ovrEye_Count,
int offset = 0);
179 OVRBuffer(
const ovrSession &session,
int eyeIdx);
195 void destroy(
const ovrSession &session);
GLuint m_eyeFbo
Definition: OVRDevice.h:199
GLuint m_eyeTexMSAA
Definition: OVRDevice.h:203
ovrSwapTextureSet * m_swapTextureSet
Definition: OVRDevice.h:206
ovrSession m_hmdSession
Definition: OVRDevice.h:210
double m_frameTiming
Definition: OVRDevice.h:223
ovrGLTexture * m_mirrorTexture
Definition: OVRDevice.h:227
cOVRDevice()
Constructor of cOVRDevice.
Definition: OVRDevice.h:125
const OVR::Matrix4f onEyeRender(int eyeIndex)
Definition: OVRDevice.cpp:374
void destroy(const ovrSession &session)
Definition: OVRDevice.cpp:191
ovrTrackingState m_trackingState
Definition: OVRDevice.h:224
ovrEyeRenderDesc m_eyeRenderDesc[ovrEye_Count]
Definition: OVRDevice.h:212
ovrSizei getEyeTextureSize(int a_index)
Definition: OVRDevice.h:166
bool initVR()
Definition: OVRDevice.cpp:222
ovrPosef m_eyeRenderPose[ovrEye_Count]
Definition: OVRDevice.h:213
void onRenderStart()
Definition: OVRDevice.cpp:360
bool m_msaaEnabled
Definition: OVRDevice.h:236
void destroyVR()
Definition: OVRDevice.cpp:323
void recenterPose()
Definition: OVRDevice.h:165
bool MSAAEnabled() const
Definition: OVRDevice.h:164
const OVR::Matrix4f getEyeMVPMatrix(int eyeIdx) const
Definition: OVRDevice.cpp:419
GLuint m_nonDistortTexture
Definition: OVRDevice.h:230
void blitMirror(ovrEyeType numEyes=ovrEye_Count, int offset=0)
Definition: OVRDevice.cpp:456
const ovrSizei getResolution() const
Definition: OVRDevice.cpp:352
OVR::Matrix4f m_eyePose[ovrEye_Count]
Definition: OVRDevice.h:220
GLuint m_depthTexMSAA
Definition: OVRDevice.h:204
Definition: OVRDevice.h:177
OVR::Matrix4f m_eyeOrientation[ovrEye_Count]
Definition: OVRDevice.h:219
bool initVRBuffers(int windowWidth, int windowHeight)
Definition: OVRDevice.cpp:245
void submitFrame()
Definition: OVRDevice.cpp:426
void onNonDistortMirrorStart()
Definition: OVRDevice.cpp:484
ovrTexture m_eyeTexture
Definition: OVRDevice.h:197
GLuint m_msaaEyeFbo
Definition: OVRDevice.h:202
void blitNonDistortMirror(int offset)
Definition: OVRDevice.cpp:496
void setMSAA(bool val)
Definition: OVRDevice.h:163
GLuint m_mirrorFBO
Definition: OVRDevice.h:232
OVR::Matrix4f m_projectionMatrix[ovrEye_Count]
Definition: OVRDevice.h:217
int m_nonDistortViewPortHeight
Definition: OVRDevice.h:235
void onRender()
Definition: OVRDevice.cpp:164
void onRenderFinish()
Definition: OVRDevice.cpp:182
void onEyeRenderFinish(int eyeIndex)
Definition: OVRDevice.cpp:409
bool isDebugHMD() const
Definition: OVRDevice.h:160
OVR::Matrix4f m_eyeViewOffset[ovrEye_Count]
Definition: OVRDevice.h:218
GLuint m_depthBuffer
Definition: OVRDevice.h:200
GLuint m_nonDistortFBO
Definition: OVRDevice.h:233
bool isDK2() const
Definition: OVRDevice.h:161
void setupMSAA()
Definition: OVRDevice.cpp:90
ovrSizei m_eyeTextureSize
Definition: OVRDevice.h:198
void showPerfStats(ovrPerfHudMode statsMode)
Definition: OVRDevice.cpp:515
ovrVector3f m_hmdToEyeViewOffset[ovrEye_Count]
Definition: OVRDevice.h:214
~cOVRDevice()
Destructor of cOVRDevice.
Definition: OVRDevice.cpp:213
void onRenderMSAAFinish()
Definition: OVRDevice.cpp:143
void onRenderMSAA()
Definition: OVRDevice.cpp:128
bool initNonDistortMirror(int windowWidth, int windowHeight)
Definition: OVRDevice.cpp:274
This class implements support for the Oculus Rift DK2.
Definition: OVRDevice.h:116
GLuint m_nonDistortDepthBuffer
Definition: OVRDevice.h:231
ovrHmdDesc m_hmdDesc
Definition: OVRDevice.h:211
OVRBuffer(const ovrSession &session, int eyeIdx)
Definition: OVRDevice.cpp:53
int m_nonDistortViewPortWidth
Definition: OVRDevice.h:234
void renderTrackerFrustum()
Definition: OVRDevice.cpp:509
OVRBuffer * m_eyeBuffers[ovrEye_Count]
Definition: OVRDevice.h:215