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