X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpipeline.cpp;h=a7f4130bbab1fffd2605521426f562dbf42a92bf;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hp=b98ddb8a8d1185c1247522afca359edf80e7d06b;hpb=df20a7e137542a4156cc5ffa8118d59de6b68547;p=libs%2Fgl.git diff --git a/source/pipeline.cpp b/source/pipeline.cpp index b98ddb8a..a7f4130b 100644 --- a/source/pipeline.cpp +++ b/source/pipeline.cpp @@ -57,7 +57,7 @@ void Pipeline::set_hdr(bool h) if(h==hdr) return; - bool old_hdr= hdr; + bool old_hdr = hdr; hdr = h; try { @@ -171,7 +171,7 @@ void Pipeline::render(Renderer &renderer, const Tag &tag) const { Framebuffer &fbo = (samples ? target_ms : target[0])->get_framebuffer(); fbo.bind(); - fbo.clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT); + fbo.clear(); } for(PassList::const_iterator i=passes.begin(); i!=passes.end(); ++i) @@ -234,7 +234,7 @@ void Pipeline::create_targets(unsigned recreate) target_ms = 0; } - PixelFormat color_pf = (hdr ? (alpha ? RGBA16F : RGB16F) : (alpha ? RGBA : RGB)); + PixelFormat color_pf = (hdr ? (alpha ? RGBA16F : RGB16F) : (alpha ? RGBA8 : RGB8)); RenderTargetFormat fmt = (RENDER_COLOR,color_pf, RENDER_DEPTH); if(!postproc.empty() || samples) {