X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsidebysidecombiner.cpp;h=ac353133bac26ea5abb2387b9731cc4b5db7589f;hb=8c61fd4fc7044c4ec0fd008173947b5b4bc00c6f;hp=213b5448249b894736d392e55c741235d10e438b;hpb=5244110fa8d347b8539f4fcff1bea729eecc2027;p=libs%2Fvr.git diff --git a/source/sidebysidecombiner.cpp b/source/sidebysidecombiner.cpp index 213b544..ac35313 100644 --- a/source/sidebysidecombiner.cpp +++ b/source/sidebysidecombiner.cpp @@ -26,11 +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_div = 2; + 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);