X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.cpp;h=b0a38a2d3240a11cc63dd8ee9c801e22a534514e;hb=83bf78244e92ca6731edd8075f158fcec6e53027;hp=fcfead76f16c2ea9495801d98f7a9ed2e7bd7801;hpb=e17243fb2421977cb781361828b77718e2cf8d48;p=libs%2Fgl.git diff --git a/source/pipeline.cpp b/source/pipeline.cpp index fcfead76..b0a38a2d 100644 --- a/source/pipeline.cpp +++ b/source/pipeline.cpp @@ -101,7 +101,10 @@ void Pipeline::render(const Tag &tag) const if(pass.lighting) pass.lighting->bind(); for(vector::const_iterator i=pass.effects.begin(); i!=pass.effects.end(); ++i) + { (*i)->prepare(); + glViewport(0, 0, width, height); + } for(vector::const_iterator i=renderables.begin(); i!=renderables.end(); ++i) (*i)->render(tag); for(vector::const_iterator i=pass.effects.end(); i--!=pass.effects.begin();) @@ -118,7 +121,10 @@ void Pipeline::render_all() const glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); } for(vector::const_iterator i=effects.begin(); i!=effects.end(); ++i) + { (*i)->prepare(); + glViewport(0, 0, width, height); + } for(vector::const_iterator i=pass_order.begin(); i!=pass_order.end(); ++i) render(*i); for(vector::const_iterator i=effects.end(); i--!=effects.begin();)