X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resource_pool.h;h=5cc2e829e8f836635b04980978372973d3618639;hp=8881958d27b0b1c4d2a082bbb649dcecc2304347;hb=825c90789c229f502520bf0b665596d473f2636d;hpb=831150846e1e79b53b02b07fbf12ec7cae289a3a diff --git a/resource_pool.h b/resource_pool.h index 8881958..5cc2e82 100644 --- a/resource_pool.h +++ b/resource_pool.h @@ -29,6 +29,7 @@ #include #include #include +#include namespace movit { @@ -56,7 +57,14 @@ public: // compiled program from the cache if possible. Keeps ownership of the // program; you must call release_glsl_program() instead of deleting it // when you no longer want it. - GLuint compile_glsl_program(const std::string& vertex_shader, const std::string& fragment_shader); + // + // If contains more than one value, the given + // outputs will be bound to fragment shader output colors in the order + // they appear in the vector. Otherwise, output order is undefined and + // determined by the OpenGL driver. + GLuint compile_glsl_program(const std::string& vertex_shader, + const std::string& fragment_shader, + const std::vector& frag_shader_outputs); void release_glsl_program(GLuint glsl_program_num); // Allocate a 2D texture of the given internal format and dimensions,