5 bool Effect::set_int(const std::string &key, int value)
7 if (params_int.count(key) == 0) {
10 *params_int[key] = value;
14 bool Effect::set_float(const std::string &key, float value)
16 if (params_float.count(key) == 0) {
19 *params_float[key] = value;
23 bool Effect::set_vec3(const std::string &key, const float *values)
25 if (params_vec3.count(key) == 0) {
28 memcpy(params_vec3[key], values, sizeof(float) * 3);
32 void Effect::register_int(const std::string &key, int *value)
34 assert(params_int.count(key) == 0);
35 params_int[key] = value;
38 void Effect::register_float(const std::string &key, float *value)
40 assert(params_float.count(key) == 0);
41 params_float[key] = value;
44 void Effect::register_vec3(const std::string &key, float *values)
46 assert(params_vec3.count(key) == 0);
47 params_vec3[key] = values;