X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=lift_gamma_gain_effect.cpp;h=5bc989aba08fbb5e2a5291cfcbf142469705f57f;hp=8be3a7692ea35b782ffbbd7f381d25e7841f1338;hb=8dedcc2fd11b00fec125212b60e144363033137d;hpb=96a1cff51a8b7dc45ebe725e0d0685eecce31331 diff --git a/lift_gamma_gain_effect.cpp b/lift_gamma_gain_effect.cpp index 8be3a76..5bc989a 100644 --- a/lift_gamma_gain_effect.cpp +++ b/lift_gamma_gain_effect.cpp @@ -1,12 +1,12 @@ -#define GL_GLEXT_PROTOTYPES 1 - +#include #include -#include -#include +#include "effect_util.h" #include "lift_gamma_gain_effect.h" #include "util.h" +using namespace std; + LiftGammaGainEffect::LiftGammaGainEffect() : lift(0.0f, 0.0f, 0.0f), gamma(1.0f, 1.0f, 1.0f), @@ -17,14 +17,14 @@ LiftGammaGainEffect::LiftGammaGainEffect() register_vec3("gain", (float *)&gain); } -std::string LiftGammaGainEffect::output_glsl() +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 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),