conworlds

view src/vr/vr.h @ 6:3c36bc28c6c2

more stuff in the vr test
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 21 Aug 2014 01:08:03 +0300
parents 8b7da5ab814e
children bd8202d6d28d
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 int vr_swap_buffers(void);
38 #ifdef __cplusplus
39 }
40 #endif
42 #endif /* VR_H_ */