]> git.tdb.fi Git - libs/vr.git/blobdiff - source/sidebysidecombiner.cpp
Give combiners more control over rendering
[libs/vr.git] / source / sidebysidecombiner.cpp
index ac353133bac26ea5abb2387b9731cc4b5db7589f..b1b8f9db06ed2e25537164bf0d4459b943dd0a76 100644 (file)
@@ -26,7 +26,8 @@ const char fs_source[] =
 namespace Msp {
 namespace VR {
 
-SideBySideCombiner::SideBySideCombiner(GL::View &view, bool c):
+SideBySideCombiner::SideBySideCombiner(GL::View &v, bool c):
+       view(v),
        mesh(GL::VERTEX2),
        shprog(vs_source, fs_source)
 {
@@ -67,6 +68,8 @@ void SideBySideCombiner::render(const GL::Texture2D &left, const GL::Texture2D &
        right.bind();
        right_shdata.apply();
        mesh.draw();
+
+       view.get_context().swap_buffers();
 }
 
 } // namespace VR