goat3dgfx

view src/vr/vr_impl.h @ 25:6236080aaea4

LIBOVR conditional compilation fix
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 27 Feb 2014 01:40:12 +0200
parents 7d6b667821cf
children
line source
1 #ifndef VR_IMPL_H_
2 #define VR_IMPL_H_
4 #include "config.h"
6 #ifdef USE_LIBOVR
7 #include <OVR.h>
9 using namespace OVR;
10 #endif
12 struct VRContext {
13 #ifdef USE_LIBOVR
14 DeviceManager *ovr_devman;
15 HMDDevice *ovr_hmd_dev;
16 SensorDevice *ovr_sensor_dev;
17 SensorFusion *ovr_sfusion;
18 #endif
20 struct {
21 char *display;
22 int display_xoffs, display_yoffs;
24 // the full width and height of the display (both eyes)
25 int width, height;
26 float fov;
27 // the full aspect ratio of the display (both eyes)
28 float aspect;
29 float ipd;
30 float distort[4];
31 // the right lens center offset (negate for left)
32 float lens_center_offset;
33 float proj_center_offset;
34 float scale; // scaling to be applied to the two views to fill the screen
35 } info;
36 };
38 extern VRContext vr_ctx;
40 bool vr_gl_init();
42 #endif // VR_IMPL_H_