X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Fsidebysidecombiner.cpp;h=ac353133bac26ea5abb2387b9731cc4b5db7589f;hp=c5aef041ecf3f123501d9fc062d5c497f1abe1de;hb=cb460150f6870c172a70237f283c9753250be361;hpb=0f239b07bc06bf26d0ee0f9c1ee1e3b636f6d1f6 diff --git a/source/sidebysidecombiner.cpp b/source/sidebysidecombiner.cpp index c5aef04..ac35313 100644 --- a/source/sidebysidecombiner.cpp +++ b/source/sidebysidecombiner.cpp @@ -26,12 +26,13 @@ const char fs_source[] = namespace Msp { namespace VR { -SideBySideCombiner::SideBySideCombiner(bool c): +SideBySideCombiner::SideBySideCombiner(GL::View &view, bool c): mesh(GL::VERTEX2), shprog(vs_source, fs_source) { - width_factor = 0.5f; - aspect_factor = 0.5f; + target_width = view.get_width()/2; + target_height = view.get_height()/2; + render_aspect = static_cast(target_width)/target_height; left_shdata.uniform("texture", 0); right_shdata.uniform("texture", 0);