goat3dgfx

annotate src/vr/vr_impl.h @ 11:d061fe1a31ec

compile vr source files or not
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 24 Nov 2013 14:00:14 +0200
parents
children 7d6b667821cf
rev   line source
nuclear@11 1 #ifndef VR_IMPL_H_
nuclear@11 2 #define VR_IMPL_H_
nuclear@11 3
nuclear@11 4 #include <OVR.h>
nuclear@11 5
nuclear@11 6 using namespace OVR;
nuclear@11 7
nuclear@11 8 struct VRContext {
nuclear@11 9 DeviceManager *ovr_devman;
nuclear@11 10 HMDDevice *ovr_hmd_dev;
nuclear@11 11 SensorDevice *ovr_sensor_dev;
nuclear@11 12 SensorFusion ovr_sfusion;
nuclear@11 13
nuclear@11 14 struct {
nuclear@11 15 char *display;
nuclear@11 16 int display_xoffs, display_yoffs;
nuclear@11 17
nuclear@11 18 // the full width and height of the display (both eyes)
nuclear@11 19 int width, height;
nuclear@11 20 float fov;
nuclear@11 21 // the full aspect ratio of the display (both eyes)
nuclear@11 22 float aspect;
nuclear@11 23 float ipd;
nuclear@11 24 float distort[4];
nuclear@11 25 // the right lens center offset (negate for left)
nuclear@11 26 float lens_center_offset;
nuclear@11 27 float proj_center_offset;
nuclear@11 28 float scale; // scaling to be applied to the two views to fill the screen
nuclear@11 29 } info;
nuclear@11 30 };
nuclear@11 31
nuclear@11 32 extern VRContext vr_ctx;
nuclear@11 33
nuclear@11 34 bool vr_gl_init();
nuclear@11 35
nuclear@11 36 #endif // VR_IMPL_H_