oculus1
annotate 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 |
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@15 | 15 char *display; |
nuclear@3 | 16 // the full width and height of the display (both eyes) |
nuclear@3 | 17 int width, height; |
nuclear@3 | 18 float fov; |
nuclear@3 | 19 // the full aspect ratio of the display (both eyes) |
nuclear@3 | 20 float aspect; |
nuclear@3 | 21 float ipd; |
nuclear@3 | 22 float distort[4]; |
nuclear@12 | 23 // the right lens center offset (negate for left) |
nuclear@13 | 24 float lens_center_offset; |
nuclear@13 | 25 float proj_center_offset; |
nuclear@13 | 26 float scale; // scaling to be applied to the two views to fill the screen |
nuclear@3 | 27 } info; |
nuclear@1 | 28 }; |
nuclear@1 | 29 |
nuclear@3 | 30 extern VRContext vr_ctx; |
nuclear@1 | 31 |
nuclear@12 | 32 bool vr_gl_init(); |
nuclear@12 | 33 |
nuclear@1 | 34 #endif // VR_IMPL_H_ |