+ // Same as the previous, but for compile shaders instead. There is currently
+ // no support for binding multiple outputs.
+ GLuint compile_glsl_compute_program(const std::string& compile_shader);
+ void release_glsl_compute_program(GLuint glsl_program_num);
+
+ // Since uniforms belong to the program and not to the context,
+ // a given GLSL program number can't be used by more than one thread
+ // at a time. Thus, if two threads want to use the same program
+ // (usually because two EffectChains share them via caching),
+ // we will need to make a clone. use_glsl_program() makes such
+ // a clone if needed, calls glUseProgram(), and returns the real
+ // program number that was used; this must be given to
+ // unuse_glsl_program() to release it. unuse_glsl_program() does not
+ // actually change any OpenGL state, though.
+ GLuint use_glsl_program(GLuint glsl_program_num);
+ void unuse_glsl_program(GLuint instance_program_num);
+