conworlds

diff src/vr/vr_libovr.c @ 4:e6948e131526

adding a vr wrapper
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Aug 2014 06:33:43 +0300
parents
children 8b7da5ab814e
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/vr/vr_libovr.c	Wed Aug 20 06:33:43 2014 +0300
     1.3 @@ -0,0 +1,37 @@
     1.4 +#include "vr_impl.h"
     1.5 +
     1.6 +static int init(void)
     1.7 +{
     1.8 +	return -1;
     1.9 +}
    1.10 +
    1.11 +static void cleanup(void)
    1.12 +{
    1.13 +}
    1.14 +
    1.15 +static void view_matrix(int eye, float *mat)
    1.16 +{
    1.17 +}
    1.18 +
    1.19 +static void proj_matrix(int eye, float *mat)
    1.20 +{
    1.21 +}
    1.22 +
    1.23 +static void draw(unsigned int fbtex, float u, float maxu, float v, float maxv)
    1.24 +{
    1.25 +}
    1.26 +
    1.27 +struct vr_module *vr_module_libovr(void)
    1.28 +{
    1.29 +	static struct vr_module m;
    1.30 +
    1.31 +	if(!m.init) {
    1.32 +		m.name = "libovr";
    1.33 +		m.init = init;
    1.34 +		m.cleanup = cleanup;
    1.35 +		m.view_matrix = view_matrix;
    1.36 +		m.proj_matrix = proj_matrix;
    1.37 +		m.draw = draw;
    1.38 +	}
    1.39 +	return &m;
    1.40 +}