conworlds

view src/vr/vr.h @ 5:8b7da5ab814e

vr wrapper in progress
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Aug 2014 16:34:43 +0300
parents e6948e131526
children 3c36bc28c6c2
line source
1 #ifndef VR_H_
2 #define VR_H_
4 enum {
5 VR_EYE_LEFT,
6 VR_EYE_RIGHT
7 };
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 int vr_init(void);
14 void vr_shutdown(void);
16 int vr_module_count(void);
17 const char *vr_module_name(int idx);
19 int vr_use_module(int idx);
20 int vr_use_module_named(const char *name);
22 /* if we're using a vr module which requires a specific output resolution, vr_display_size
23 * returns non-zero, and writes the size through the xsz/ysz pointers. Otherwise returns 0
24 */
25 int vr_display_size(int *xsz, int *ysz);
26 int vr_eye_texture_size(int eye, int *xsz, int *ysz);
28 /* returns non-zero if the active vr module provides this kind of matrix
29 * information, otherwise it returns zero, and sets mat to identity
30 */
31 int vr_view_matrix(int eye, float *mat);
32 int vr_proj_matrix(int eye, float *mat);
34 void vr_begin(int eye);
35 void vr_end(void);
36 void vr_present(void);
38 #ifdef __cplusplus
39 }
40 #endif
42 #endif /* VR_H_ */