annotate 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 |
rev |
line source |
nuclear@4
|
1 #ifndef VR_H_
|
nuclear@4
|
2 #define VR_H_
|
nuclear@4
|
3
|
nuclear@5
|
4 enum {
|
nuclear@5
|
5 VR_EYE_LEFT,
|
nuclear@5
|
6 VR_EYE_RIGHT
|
nuclear@5
|
7 };
|
nuclear@5
|
8
|
nuclear@4
|
9 #ifdef __cplusplus
|
nuclear@4
|
10 extern "C" {
|
nuclear@4
|
11 #endif
|
nuclear@4
|
12
|
nuclear@4
|
13 int vr_init(void);
|
nuclear@4
|
14 void vr_shutdown(void);
|
nuclear@4
|
15
|
nuclear@4
|
16 int vr_module_count(void);
|
nuclear@4
|
17 const char *vr_module_name(int idx);
|
nuclear@4
|
18
|
nuclear@4
|
19 int vr_use_module(int idx);
|
nuclear@4
|
20 int vr_use_module_named(const char *name);
|
nuclear@4
|
21
|
nuclear@5
|
22 /* if we're using a vr module which requires a specific output resolution, vr_display_size
|
nuclear@5
|
23 * returns non-zero, and writes the size through the xsz/ysz pointers. Otherwise returns 0
|
nuclear@5
|
24 */
|
nuclear@5
|
25 int vr_display_size(int *xsz, int *ysz);
|
nuclear@5
|
26 int vr_eye_texture_size(int eye, int *xsz, int *ysz);
|
nuclear@5
|
27
|
nuclear@4
|
28 /* returns non-zero if the active vr module provides this kind of matrix
|
nuclear@4
|
29 * information, otherwise it returns zero, and sets mat to identity
|
nuclear@4
|
30 */
|
nuclear@4
|
31 int vr_view_matrix(int eye, float *mat);
|
nuclear@4
|
32 int vr_proj_matrix(int eye, float *mat);
|
nuclear@4
|
33
|
nuclear@5
|
34 void vr_begin(int eye);
|
nuclear@5
|
35 void vr_end(void);
|
nuclear@6
|
36 int vr_swap_buffers(void);
|
nuclear@4
|
37
|
nuclear@4
|
38 #ifdef __cplusplus
|
nuclear@4
|
39 }
|
nuclear@4
|
40 #endif
|
nuclear@4
|
41
|
nuclear@4
|
42 #endif /* VR_H_ */
|