libgoatvr

view src/opt.h @ 31:ec6edfe7774c

forgot to add the glext.h file
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 12 Apr 2015 02:02:04 +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_ */