Support multiple render phases (with FBOs and all), and make a sample blur effect...
[movit] / blur_effect.cpp
1 #define GL_GLEXT_PROTOTYPES 1
2
3 #include <math.h>
4 #include <GL/gl.h>
5 #include <GL/glext.h>
6
7 #include "blur_effect.h"
8 #include "util.h"
9
10 BlurEffect::BlurEffect()
11         : radius(0.3f)
12 {
13         register_float("radius", (float *)&radius);
14 }
15
16 std::string BlurEffect::output_fragment_shader()
17 {
18         return read_file("blur_effect.frag");
19 }
20
21 void BlurEffect::set_uniforms(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
22 {
23         Effect::set_uniforms(glsl_program_num, prefix, sampler_num);
24 }