libgoatvr

view src/opt.h @ 19:437fe32ac633

ops... wasn't handling the stereo eye separation correctly. also fixed a bug in vr_libovr.c causing an assertion inside LibOVR when ovrHmd_GetEyePose was called as a result of calls to view_rotation or view_translation outside of vr_begin/vr_end
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 04 Oct 2014 03:39:14 +0300
parents ded3d0a74e19
children
line source
1 #ifndef OPT_H_
2 #define OPT_H_
4 enum opt_type { OTYPE_INT, OTYPE_FLOAT, OTYPE_VEC };
6 struct option {
7 enum opt_type type;
8 int ival;
9 float fval;
10 float vval[4];
11 };
13 void *create_options(void);
14 void destroy_options(void *optdb);
16 void set_option_int(void *optdb, const char *key, int val);
17 void set_option_float(void *optdb, const char *key, float val);
18 void set_option_vec(void *optdb, const char *key, float *val);
19 /* convenience functions */
20 void set_option_vec3f(void *optdb, const char *key, float x, float y, float z);
21 void set_option_vec4f(void *optdb, const char *key, float x, float y, float z, float w);
23 int get_option_int(void *optdb, const char *key, int *val);
24 int get_option_float(void *optdb, const char *key, float *val);
25 int get_option_vec(void *optdb, const char *key, float *val);
27 #endif /* OPT_H_ */