- std::string output = "";
- for (std::map<std::string, float*>::const_iterator it = params_float.begin();
- it != params_float.end();
- ++it) {
- char buf[256];
- sprintf(buf, "uniform float PREFIX(%s);\n", it->first.c_str());
- output.append(buf);
- }
- for (std::map<std::string, float*>::const_iterator it = params_vec2.begin();
- it != params_vec2.end();
- ++it) {
- char buf[256];
- sprintf(buf, "uniform vec2 PREFIX(%s);\n", it->first.c_str());
- output.append(buf);
- }
- for (std::map<std::string, float*>::const_iterator it = params_vec3.begin();
- it != params_vec3.end();
- ++it) {
- char buf[256];
- sprintf(buf, "uniform vec3 PREFIX(%s);\n", it->first.c_str());
- output.append(buf);
- }
- for (std::map<std::string, Texture1D>::const_iterator it = params_tex_1d.begin();
- it != params_tex_1d.end();
- ++it) {
- char buf[256];
- sprintf(buf, "uniform sampler1D PREFIX(%s);\n", it->first.c_str());
- output.append(buf);
- }
- return output;