libgoatvr

annotate src/vr_impl.h @ 2:fc256d38257f

added readme and license files
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 29 Aug 2014 05:33:22 +0300
parents
children
rev   line source
nuclear@0 1 #ifndef VR_IMPL_H_
nuclear@0 2 #define VR_IMPL_H_
nuclear@0 3
nuclear@0 4 #include "vr.h"
nuclear@0 5 #include "opt.h"
nuclear@0 6
nuclear@0 7 struct vr_module {
nuclear@0 8 char *name;
nuclear@0 9
nuclear@0 10 int (*init)(void);
nuclear@0 11 void (*cleanup)(void);
nuclear@0 12
nuclear@0 13 int (*set_option)(const char *opt, enum opt_type type, void *valp);
nuclear@0 14 int (*get_option)(const char *opt, enum opt_type type, void *valp);
nuclear@0 15
nuclear@0 16 void (*translation)(int eye, float *vec);
nuclear@0 17 void (*rotation)(int eye, float *quat);
nuclear@0 18
nuclear@0 19 void (*view_matrix)(int eye, float *mat);
nuclear@0 20 void (*proj_matrix)(int eye, float znear, float zfar, float *mat);
nuclear@0 21
nuclear@0 22 void (*begin)(int eye);
nuclear@0 23 void (*end)(void);
nuclear@0 24 int (*present)(void);
nuclear@0 25
nuclear@0 26 void (*set_eye_texture)(int eye, unsigned int tex, float umin, float vmin, float umax, float vmax);
nuclear@0 27
nuclear@0 28 void (*recenter)(void);
nuclear@0 29 };
nuclear@0 30
nuclear@0 31 void vr_init_modules(void);
nuclear@0 32
nuclear@0 33 void vr_clear_modules(void);
nuclear@0 34 void vr_register_module(struct vr_module *mod);
nuclear@0 35
nuclear@0 36 int vr_get_num_modules(void);
nuclear@0 37 struct vr_module *vr_get_module(int idx);
nuclear@0 38
nuclear@0 39 void vr_activate_module(int idx);
nuclear@0 40
nuclear@0 41 int vr_get_num_active_modules(void);
nuclear@0 42 struct vr_module *vr_get_active_module(int idx);
nuclear@0 43
nuclear@0 44 #endif /* VR_IMPL_H_ */