]> git.tdb.fi Git - libs/gl.git/blobdiff - source/pipelinebuilder.cpp
Remove the deprecated ProgramBuilder class
[libs/gl.git] / source / pipelinebuilder.cpp
index 286d6cb62f747a4d97abb366389ca01695e60ea1..51e9cc855f8b73d1cb7b4cd49f616a4cc3faea58 100644 (file)
@@ -36,6 +36,7 @@ void PipelineBuilder::set_postprocessor(const string &name, PostProcessor &pproc
 void PipelineBuilder::build(Pipeline &pipeline) const
 {
        pipeline.set_hdr(tmpl.get_hdr());
+       pipeline.set_alpha(tmpl.get_alpha());
        unsigned samples = min(tmpl.get_maximum_multisample(), Renderbuffer::get_max_samples());
        if(samples<tmpl.get_required_multisample())
                throw invalid_operation("PipelineBuilder::build");
@@ -61,10 +62,14 @@ void PipelineBuilder::build(Pipeline &pipeline) const
                PostProcessor *proc = 0;
                if(!i->slot_name.empty())
                        proc = get_item(postprocessors, i->slot_name);
-               if(!proc && i->postprocessor_template)
-                       proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height());
                if(proc)
-                       pipeline.add_postprocessor_owned(proc);
+                       pipeline.add_postprocessor(*proc);
+               else if(i->postprocessor_template)
+               {
+                       proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height());
+                       if(proc)
+                               pipeline.add_postprocessor_owned(proc);
+               }
        }
 }