oculus1

view src/vr_impl.h @ 15:402cbb6d9ce3

added the shader as a separate header file
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 21 Sep 2013 04:15:20 +0300
parents 464e1d135d68
children f3672317e5c2
line source
1 #ifndef VR_IMPL_H_
2 #define VR_IMPL_H_
4 #include <OVR.h>
6 using namespace OVR;
8 struct VRContext {
9 DeviceManager *ovr_devman;
10 HMDDevice *ovr_hmd_dev;
11 SensorDevice *ovr_sensor_dev;
12 SensorFusion ovr_sfusion;
14 struct {
15 char *display;
16 // the full width and height of the display (both eyes)
17 int width, height;
18 float fov;
19 // the full aspect ratio of the display (both eyes)
20 float aspect;
21 float ipd;
22 float distort[4];
23 // the right lens center offset (negate for left)
24 float lens_center_offset;
25 float proj_center_offset;
26 float scale; // scaling to be applied to the two views to fill the screen
27 } info;
28 };
30 extern VRContext vr_ctx;
32 bool vr_gl_init();
34 #endif // VR_IMPL_H_