symmetry

annotate src/vr/vr_impl.h @ 0:a90a71a74f0b

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