goat3dgfx

diff src/vr/vr_impl.h @ 11:d061fe1a31ec

compile vr source files or not
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 24 Nov 2013 14:00:14 +0200
parents
children 7d6b667821cf
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/vr/vr_impl.h	Sun Nov 24 14:00:14 2013 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +#ifndef VR_IMPL_H_
     1.5 +#define VR_IMPL_H_
     1.6 +
     1.7 +#include <OVR.h>
     1.8 +
     1.9 +using namespace OVR;
    1.10 +
    1.11 +struct VRContext {
    1.12 +	DeviceManager *ovr_devman;
    1.13 +	HMDDevice *ovr_hmd_dev;
    1.14 +	SensorDevice *ovr_sensor_dev;
    1.15 +	SensorFusion ovr_sfusion;
    1.16 +
    1.17 +	struct {
    1.18 +		char *display;
    1.19 +		int display_xoffs, display_yoffs;
    1.20 +
    1.21 +		// the full width and height of the display (both eyes)
    1.22 +		int width, height;
    1.23 +		float fov;
    1.24 +		// the full aspect ratio of the display (both eyes)
    1.25 +		float aspect;
    1.26 +		float ipd;
    1.27 +		float distort[4];
    1.28 +		// the right lens center offset (negate for left)
    1.29 +		float lens_center_offset;
    1.30 +		float proj_center_offset;
    1.31 +		float scale;	// scaling to be applied to the two views to fill the screen
    1.32 +	} info;
    1.33 +};
    1.34 +
    1.35 +extern VRContext vr_ctx;
    1.36 +
    1.37 +bool vr_gl_init();
    1.38 +
    1.39 +#endif	// VR_IMPL_H_