]> git.tdb.fi Git - libs/vr.git/commitdiff
Clear the FBO before rendering
authorMikko Rasa <tdb@tdb.fi>
Fri, 13 Sep 2013 13:26:00 +0000 (16:26 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 13 Sep 2013 13:26:00 +0000 (16:26 +0300)
source/stereoview.cpp

index 02c60acce33a885ec0517c25d955a855b2ba4a80..c52802309ef5119677e2451ddc81c9a63717a1cb 100644 (file)
@@ -112,6 +112,7 @@ void StereoView::Eye::setup_frame(const GL::Camera &base_camera, const GL::Vecto
 void StereoView::Eye::render(const GL::Renderable &renderable, const GL::Tag &tag) const
 {
        GL::Bind bind_fbo(target->fbo);
+       target->fbo.clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);
        GL::Renderer renderer(&camera);
        renderable.render(renderer, tag);
 }