conworlds

view src/vr/vr_impl.h @ 7:bd8202d6d28d

some progress...
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 22 Aug 2014 16:55:16 +0300
parents 8b7da5ab814e
children 90abf4b93cc9
line source
1 #ifndef VR_IMPL_H_
2 #define VR_IMPL_H_
4 #include "vr.h"
5 #include "opt.h"
7 struct vr_module {
8 char *name;
10 int (*init)(void);
11 void (*cleanup)(void);
13 int (*set_option)(const char *opt, enum opt_type type, void *valp);
14 int (*get_option)(const char *opt, enum opt_type type, void *valp);
16 void (*translation)(int eye, float *vec);
17 void (*rotation)(int eye, float *quat);
19 void (*proj_matrix)(int eye, float znear, float zfar, float *mat);
21 void (*begin)(int eye);
22 void (*end)(void);
23 void (*present)(void);
25 void (*set_eye_texture)(int eye, unsigned int tex, float umin, float vmin, float umax, float vmax);
27 void (*recenter)(void);
28 };
30 void vr_init_modules(void);
32 void vr_clear_modules(void);
33 void vr_register_module(struct vr_module *mod);
35 int vr_get_num_modules(void);
36 struct vr_module *vr_get_module(int idx);
38 void vr_activate_module(int idx);
40 int vr_get_num_active_modules(void);
41 struct vr_module *vr_get_active_module(int idx);
43 #endif /* VR_IMPL_H_ */