vrchess

view 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 source
1 #ifndef VR_H_
2 #define VR_H_
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 int vr_init(void);
9 void vr_shutdown(void);
11 int vr_module_count(void);
12 const char *vr_module_name(int idx);
14 int vr_use_module(int idx);
15 int vr_use_module_named(const char *name);
17 /* returns non-zero if the active vr module provides this kind of matrix
18 * information, otherwise it returns zero, and sets mat to identity
19 */
20 int vr_view_matrix(int eye, float *mat);
21 int vr_proj_matrix(int eye, float *mat);
23 /* fbtex should be a texture containing both eye views side by side (LR) */
24 void vr_present(unsigned int fbtex);
26 /* set the area of the framebuffer texture to be used */
27 void vr_fbrect(float u, float umax, float v, float vmax);
29 #ifdef __cplusplus
30 }
31 #endif
33 #endif /* VR_H_ */