annotate src/vr/vr_impl.h @ 18:e4257df067a1
oh yeah, now the tracking is solid. Wasn't rendering the correct part of the texture before.
author |
John Tsiombikas <nuclear@member.fsf.org> |
date |
Tue, 26 Aug 2014 12:59:15 +0300 |
parents |
90abf4b93cc9 |
children |
|
rev |
line source |
nuclear@4
|
1 #ifndef VR_IMPL_H_
|
nuclear@4
|
2 #define VR_IMPL_H_
|
nuclear@4
|
3
|
nuclear@7
|
4 #include "vr.h"
|
nuclear@7
|
5 #include "opt.h"
|
nuclear@7
|
6
|
nuclear@4
|
7 struct vr_module {
|
nuclear@4
|
8 char *name;
|
nuclear@4
|
9
|
nuclear@4
|
10 int (*init)(void);
|
nuclear@4
|
11 void (*cleanup)(void);
|
nuclear@4
|
12
|
nuclear@7
|
13 int (*set_option)(const char *opt, enum opt_type type, void *valp);
|
nuclear@7
|
14 int (*get_option)(const char *opt, enum opt_type type, void *valp);
|
nuclear@7
|
15
|
nuclear@7
|
16 void (*translation)(int eye, float *vec);
|
nuclear@7
|
17 void (*rotation)(int eye, float *quat);
|
nuclear@7
|
18
|
nuclear@10
|
19 void (*view_matrix)(int eye, float *mat);
|
nuclear@7
|
20 void (*proj_matrix)(int eye, float znear, float zfar, float *mat);
|
nuclear@4
|
21
|
nuclear@5
|
22 void (*begin)(int eye);
|
nuclear@5
|
23 void (*end)(void);
|
nuclear@8
|
24 int (*present)(void);
|
nuclear@7
|
25
|
nuclear@7
|
26 void (*set_eye_texture)(int eye, unsigned int tex, float umin, float vmin, float umax, float vmax);
|
nuclear@7
|
27
|
nuclear@7
|
28 void (*recenter)(void);
|
nuclear@4
|
29 };
|
nuclear@4
|
30
|
nuclear@4
|
31 void vr_init_modules(void);
|
nuclear@4
|
32
|
nuclear@4
|
33 void vr_clear_modules(void);
|
nuclear@4
|
34 void vr_register_module(struct vr_module *mod);
|
nuclear@4
|
35
|
nuclear@4
|
36 int vr_get_num_modules(void);
|
nuclear@4
|
37 struct vr_module *vr_get_module(int idx);
|
nuclear@4
|
38
|
nuclear@4
|
39 void vr_activate_module(int idx);
|
nuclear@4
|
40
|
nuclear@4
|
41 int vr_get_num_active_modules(void);
|
nuclear@4
|
42 struct vr_module *vr_get_active_module(int idx);
|
nuclear@4
|
43
|
nuclear@4
|
44 #endif /* VR_IMPL_H_ */
|