- glActiveTexture(GL_TEXTURE0);
- check_error();
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, base_mipmap_level);
- check_error();
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, base_mipmap_level);
- check_error();
+SingleBlurPassEffect::SingleBlurPassEffect()
+ : radius(3.0f),
+ direction(HORIZONTAL),
+ width(1280),
+ height(720)
+{
+ register_float("radius", &radius);
+ register_int("direction", (int *)&direction);
+ register_int("width", &width);
+ register_int("height", &height);
+}
+
+std::string SingleBlurPassEffect::output_fragment_shader()
+{
+ return read_file("blur_effect.frag");
+}
+
+void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
+{
+ Effect::set_gl_state(glsl_program_num, prefix, sampler_num);