conworlds
diff src/vr/vr_impl.h @ 4:e6948e131526
adding a vr wrapper
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 20 Aug 2014 06:33:43 +0300 |
parents | |
children | 8b7da5ab814e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/vr/vr_impl.h Wed Aug 20 06:33:43 2014 +0300 1.3 @@ -0,0 +1,29 @@ 1.4 +#ifndef VR_IMPL_H_ 1.5 +#define VR_IMPL_H_ 1.6 + 1.7 +struct vr_module { 1.8 + char *name; 1.9 + 1.10 + int (*init)(void); 1.11 + void (*cleanup)(void); 1.12 + 1.13 + void (*view_matrix)(int eye, float *mat); 1.14 + void (*proj_matrix)(int eye, float *mat); 1.15 + 1.16 + void (*draw)(unsigned int fbtex, float u, float maxu, float v, float maxv); 1.17 +}; 1.18 + 1.19 +void vr_init_modules(void); 1.20 + 1.21 +void vr_clear_modules(void); 1.22 +void vr_register_module(struct vr_module *mod); 1.23 + 1.24 +int vr_get_num_modules(void); 1.25 +struct vr_module *vr_get_module(int idx); 1.26 + 1.27 +void vr_activate_module(int idx); 1.28 + 1.29 +int vr_get_num_active_modules(void); 1.30 +struct vr_module *vr_get_active_module(int idx); 1.31 + 1.32 +#endif /* VR_IMPL_H_ */