namespace Msp {
namespace VR {
-SideBySideCombiner::SideBySideCombiner(bool c):
+SideBySideCombiner::SideBySideCombiner(GL::View &v, bool c):
+ view(v),
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<float>(target_width)/target_height;
left_shdata.uniform("texture", 0);
right_shdata.uniform("texture", 0);
right.bind();
right_shdata.apply();
mesh.draw();
+
+ view.get_context().swap_buffers();
}
} // namespace VR