Split out some private utilities into effect_util.cpp, so we do not need to include...
[movit] / lift_gamma_gain_effect.cpp
index 8be3a76..f00da87 100644 (file)
@@ -1,9 +1,7 @@
-#define GL_GLEXT_PROTOTYPES 1
-
+#include <GL/glew.h>
 #include <math.h>
-#include <GL/gl.h>
-#include <GL/glext.h>
 
+#include "effect_util.h"
 #include "lift_gamma_gain_effect.h"
 #include "util.h"
 
@@ -17,14 +15,14 @@ LiftGammaGainEffect::LiftGammaGainEffect()
        register_vec3("gain", (float *)&gain);
 }
 
-std::string LiftGammaGainEffect::output_glsl()
+std::string LiftGammaGainEffect::output_fragment_shader()
 {
-       return read_file("lift_gamma_gain_effect.glsl");
+       return read_file("lift_gamma_gain_effect.frag");
 }
 
-void LiftGammaGainEffect::set_uniforms(GLuint glsl_program_num, const std::string &prefix)
+void LiftGammaGainEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
 {
-       Effect::set_uniforms(glsl_program_num, prefix);
+       Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
 
        RGBTriplet gain_pow_inv_gamma(
                pow(gain.r, 1.0f / gamma.r),