]> git.tdb.fi Git - libs/vr.git/blobdiff - source/stereoview.cpp
Add a StereoCombiner subclass for the Oculus Rift
[libs/vr.git] / source / stereoview.cpp
index 9a4b0e0c49dad965c6100d2847605bd54663bd55..53c6445f368b28266aba2ca372ab40a52fa3a4e6 100644 (file)
@@ -22,8 +22,8 @@ void StereoView::set_combiner(const StereoCombiner &c)
 {
        combiner = &c;
 
-       unsigned w = width/combiner->get_width_divisor();
-       unsigned h = height/combiner->get_height_divisor();
+       unsigned w = width/combiner->get_width_divisor()*combiner->get_oversize();
+       unsigned h = height/combiner->get_height_divisor()*combiner->get_oversize();
        left.create_target(w, h);
        right.create_target(w, h);
 }
@@ -39,7 +39,7 @@ void StereoView::setup_frame() const
 
        EyeParams params;
        params.fov = combiner->get_field_of_view();
-       if(!params.fov)
+       if(params.fov==Geometry::Angle<float>::zero())
                params.fov = base_camera.get_field_of_view();
 
        params.aspect = base_camera.get_aspect();