]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipeline.cpp
Drop Renderable::has_pass; renderables are now expected to ignore unknown passes
[libs/gl.git] / source / pipeline.cpp
index b0a38a2d3240a11cc63dd8ee9c801e22a534514e..5969246ba7010f37b976eef4972a81a11ad7eff6 100644 (file)
@@ -61,11 +61,6 @@ const PipelinePass &Pipeline::get_pass(const Tag &tag) const
        return i->second;
 }
 
-bool Pipeline::has_pass(const Tag &tag) const
-{
-       return passes.count(tag.id);
-}
-
 void Pipeline::add_renderable(const Renderable &r)
 {
        renderables.push_back(&r);
@@ -101,10 +96,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 +110,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();)