oculus1

annotate src/vr_impl.h @ 16:f3672317e5c2

made teapots many sizes and more colorful, added phong shader
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 21 Sep 2013 05:22:48 +0300
parents 402cbb6d9ce3
children
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@16 16 int display_xoffs, display_yoffs;
nuclear@16 17
nuclear@3 18 // the full width and height of the display (both eyes)
nuclear@3 19 int width, height;
nuclear@3 20 float fov;
nuclear@3 21 // the full aspect ratio of the display (both eyes)
nuclear@3 22 float aspect;
nuclear@3 23 float ipd;
nuclear@3 24 float distort[4];
nuclear@12 25 // the right lens center offset (negate for left)
nuclear@13 26 float lens_center_offset;
nuclear@13 27 float proj_center_offset;
nuclear@13 28 float scale; // scaling to be applied to the two views to fill the screen
nuclear@3 29 } info;
nuclear@1 30 };
nuclear@1 31
nuclear@3 32 extern VRContext vr_ctx;
nuclear@1 33
nuclear@12 34 bool vr_gl_init();
nuclear@12 35
nuclear@1 36 #endif // VR_IMPL_H_