libgoatvr

annotate 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
rev   line source
nuclear@0 1 #ifndef OPT_H_
nuclear@0 2 #define OPT_H_
nuclear@0 3
nuclear@19 4 enum opt_type { OTYPE_INT, OTYPE_FLOAT, OTYPE_VEC };
nuclear@0 5
nuclear@0 6 struct option {
nuclear@0 7 enum opt_type type;
nuclear@0 8 int ival;
nuclear@0 9 float fval;
nuclear@19 10 float vval[4];
nuclear@0 11 };
nuclear@0 12
nuclear@0 13 void *create_options(void);
nuclear@0 14 void destroy_options(void *optdb);
nuclear@0 15
nuclear@0 16 void set_option_int(void *optdb, const char *key, int val);
nuclear@0 17 void set_option_float(void *optdb, const char *key, float val);
nuclear@19 18 void set_option_vec(void *optdb, const char *key, float *val);
nuclear@19 19 /* convenience functions */
nuclear@19 20 void set_option_vec3f(void *optdb, const char *key, float x, float y, float z);
nuclear@19 21 void set_option_vec4f(void *optdb, const char *key, float x, float y, float z, float w);
nuclear@0 22
nuclear@0 23 int get_option_int(void *optdb, const char *key, int *val);
nuclear@0 24 int get_option_float(void *optdb, const char *key, float *val);
nuclear@19 25 int get_option_vec(void *optdb, const char *key, float *val);
nuclear@0 26
nuclear@0 27 #endif /* OPT_H_ */