]> git.tdb.fi Git - libs/gl.git/blobdiff - source/bloom.cpp
Make postprocessor shaders compatible with modern interface
[libs/gl.git] / source / bloom.cpp
index a715749608d45247cc1660b73de37044f75b4795..286730b9c599a782e05ed04faa9294031f5fbfa4 100644 (file)
@@ -44,10 +44,12 @@ Bloom::Bloom(unsigned w, unsigned h):
 {
        blur_shader.attach_shader(get_fullscreen_vertex_shader());
        blur_shader.attach_shader_owned(new FragmentShader(blur_fs));
+       blur_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
        blur_shader.link();
 
        combine_shader.attach_shader(get_fullscreen_vertex_shader());
        combine_shader.attach_shader_owned(new FragmentShader(combine_fs));
+       combine_shader.bind_attribute(get_component_type(VERTEX2), "vertex");
        combine_shader.link();
 
        blur_shdata[0].uniform("delta", 1.0f/w, 0.0f);
@@ -102,6 +104,7 @@ void Bloom::render(const Texture2D &src, const Texture2D &)
 {
        BindRestore unbind_dtest(static_cast<DepthTest *>(0));
        BindRestore unbind_blend(static_cast<Blend *>(0));
+       Bind bind_mesh(quad);
 
        {
                Bind bind_shader(blur_shader);