libgoatvr

view src/vr_impl.h @ 27:e819f63535b3

adding stub doc pages
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 30 Mar 2015 05:51:22 +0300
parents
children
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 (*view_matrix)(int eye, float *mat);
20 void (*proj_matrix)(int eye, float znear, float zfar, float *mat);
22 void (*begin)(int eye);
23 void (*end)(void);
24 int (*present)(void);
26 void (*set_eye_texture)(int eye, unsigned int tex, float umin, float vmin, float umax, float vmax);
28 void (*recenter)(void);
29 };
31 void vr_init_modules(void);
33 void vr_clear_modules(void);
34 void vr_register_module(struct vr_module *mod);
36 int vr_get_num_modules(void);
37 struct vr_module *vr_get_module(int idx);
39 void vr_activate_module(int idx);
41 int vr_get_num_active_modules(void);
42 struct vr_module *vr_get_active_module(int idx);
44 #endif /* VR_IMPL_H_ */