Explicitly bind fragment shader outputs in order.
[movit] / widgets.cpp
index 529d902..66ec7c5 100644 (file)
@@ -1,12 +1,17 @@
 #include <epoxy/gl.h>
 #include <math.h>
 
+#include <string>
+#include <vector>
+
 #include "resource_pool.h"
 #include "widgets.h"
 #include "util.h"
 
 #define HSV_WHEEL_SIZE 128
 
+using namespace std;
+
 namespace movit {
 
 GLuint hsv_wheel_texnum = 0;
@@ -188,12 +193,15 @@ void make_hsv_wheel_texture()
 
 void init_hsv_resources()
 {
+       vector<string> frag_shader_outputs;
        textured_program_num = resource_pool.compile_glsl_program(
                read_version_dependent_file("vs", "vert"),
-               read_version_dependent_file("texture1d", "frag"));
+               read_version_dependent_file("texture1d", "frag"),
+               frag_shader_outputs);
        colored_program_num = resource_pool.compile_glsl_program(
                read_version_dependent_file("vs-color", "vert"),
-               read_version_dependent_file("color", "frag"));
+               read_version_dependent_file("color", "frag"),
+               frag_shader_outputs);
        make_hsv_wheel_texture();
 }