]> 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 6a9556a61c5b3fd308cd0e8c0134e30ecec8f78e..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);
@@ -115,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();)