+
+ // Augment the fragment shader program text with the outputs, so that they become
+ // part of the key. Also potentially useful for debugging.
+ string fragment_shader_processed = fragment_shader;
+ for (unsigned output_index = 0; output_index < fragment_shader_outputs.size(); ++output_index) {
+ char buf[256];
+ snprintf(buf, sizeof(buf), "// Bound output: %s\n", fragment_shader_outputs[output_index].c_str());
+ fragment_shader_processed += buf;
+ }
+
+ const pair<string, string> key(vertex_shader, fragment_shader_processed);