]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.cpp
Add get_width() / get_height() methods to Renderbuffer and Framebuffer
[libs/gl.git] / source / pipeline.cpp
index b0a38a2d3240a11cc63dd8ee9c801e22a534514e..ea8b56a30763d74b2f98c93aec18e8a4f8173b5f 100644 (file)
@@ -101,10 +101,7 @@ void Pipeline::render(const Tag &tag) const
        if(pass.lighting)
                pass.lighting->bind();
        for(vector<Effect *>::const_iterator i=pass.effects.begin(); i!=pass.effects.end(); ++i)
-       {
                (*i)->prepare();
-               glViewport(0, 0, width, height);
-       }
        for(vector<const Renderable *>::const_iterator i=renderables.begin(); i!=renderables.end(); ++i)
                (*i)->render(tag);
        for(vector<Effect *>::const_iterator i=pass.effects.end(); i--!=pass.effects.begin();)
@@ -118,13 +115,10 @@ void Pipeline::render_all() const
        if(fbo)
        {
                fbo->bind();
-               glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
+               clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT);
        }
        for(vector<Effect *>::const_iterator i=effects.begin(); i!=effects.end(); ++i)
-       {
                (*i)->prepare();
-               glViewport(0, 0, width, height);
-       }
        for(vector<Tag>::const_iterator i=pass_order.begin(); i!=pass_order.end(); ++i)
                render(*i);
        for(vector<Effect *>::const_iterator i=effects.end(); i--!=effects.begin();)