]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't add externally specified postprocessors as owned
authorMikko Rasa <tdb@tdb.fi>
Fri, 26 Jul 2019 17:02:58 +0000 (20:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 26 Jul 2019 17:02:58 +0000 (20:02 +0300)
source/pipelinebuilder.cpp

index 286d6cb62f747a4d97abb366389ca01695e60ea1..fcd5efbc18a6b3829d870465747f90800cbd0494 100644 (file)
@@ -61,10 +61,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);
+               }
        }
 }