vrchess

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