vrchess

diff src/vr/vr.h @ 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.h	Wed Aug 20 06:33:43 2014 +0300
     1.3 @@ -0,0 +1,33 @@
     1.4 +#ifndef VR_H_
     1.5 +#define VR_H_
     1.6 +
     1.7 +#ifdef __cplusplus
     1.8 +extern "C" {
     1.9 +#endif
    1.10 +
    1.11 +int vr_init(void);
    1.12 +void vr_shutdown(void);
    1.13 +
    1.14 +int vr_module_count(void);
    1.15 +const char *vr_module_name(int idx);
    1.16 +
    1.17 +int vr_use_module(int idx);
    1.18 +int vr_use_module_named(const char *name);
    1.19 +
    1.20 +/* returns non-zero if the active vr module provides this kind of matrix
    1.21 + * information, otherwise it returns zero, and sets mat to identity
    1.22 + */
    1.23 +int vr_view_matrix(int eye, float *mat);
    1.24 +int vr_proj_matrix(int eye, float *mat);
    1.25 +
    1.26 +/* fbtex should be a texture containing both eye views side by side (LR) */
    1.27 +void vr_present(unsigned int fbtex);
    1.28 +
    1.29 +/* set the area of the framebuffer texture to be used */
    1.30 +void vr_fbrect(float u, float umax, float v, float vmax);
    1.31 +
    1.32 +#ifdef __cplusplus
    1.33 +}
    1.34 +#endif
    1.35 +
    1.36 +#endif	/* VR_H_ */