oculus1
annotate src/vr_impl.h @ 13:464e1d135d68
hurraaaay!
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 21 Sep 2013 03:00:47 +0300 |
parents | d797639e0234 |
children | 402cbb6d9ce3 |
rev | line source |
---|---|
nuclear@1 | 1 #ifndef VR_IMPL_H_ |
nuclear@1 | 2 #define VR_IMPL_H_ |
nuclear@1 | 3 |
nuclear@1 | 4 #include <OVR.h> |
nuclear@1 | 5 |
nuclear@1 | 6 using namespace OVR; |
nuclear@1 | 7 |
nuclear@3 | 8 struct VRContext { |
nuclear@1 | 9 DeviceManager *ovr_devman; |
nuclear@1 | 10 HMDDevice *ovr_hmd_dev; |
nuclear@1 | 11 SensorDevice *ovr_sensor_dev; |
nuclear@3 | 12 SensorFusion ovr_sfusion; |
nuclear@1 | 13 |
nuclear@3 | 14 struct { |
nuclear@3 | 15 // the full width and height of the display (both eyes) |
nuclear@3 | 16 int width, height; |
nuclear@3 | 17 float fov; |
nuclear@3 | 18 // the full aspect ratio of the display (both eyes) |
nuclear@3 | 19 float aspect; |
nuclear@3 | 20 float ipd; |
nuclear@3 | 21 float distort[4]; |
nuclear@12 | 22 // the right lens center offset (negate for left) |
nuclear@13 | 23 float lens_center_offset; |
nuclear@13 | 24 float proj_center_offset; |
nuclear@13 | 25 float scale; // scaling to be applied to the two views to fill the screen |
nuclear@3 | 26 } info; |
nuclear@1 | 27 }; |
nuclear@1 | 28 |
nuclear@3 | 29 extern VRContext vr_ctx; |
nuclear@1 | 30 |
nuclear@12 | 31 bool vr_gl_init(); |
nuclear@12 | 32 |
nuclear@1 | 33 #endif // VR_IMPL_H_ |