+ target_width(0),
+ target_height(0),
+ render_aspect(1.0f),
+ frustum_skew(0.0f)
+{ }
+
+void StereoCombiner::configure_eye_frustums(const Frustum &left_frustum, const Frustum &right_frustum)
+{
+ float vertical = max(max(left_frustum.top, -left_frustum.bottom), max(right_frustum.top, -right_frustum.bottom));
+ fov = Geometry::atan<float>(vertical)*2.0f;
+
+ float inner = max(left_frustum.right, -right_frustum.left);
+ float outer = max(-left_frustum.left, right_frustum.right);
+ frustum_skew = (inner-outer)/(inner+outer);
+
+ render_aspect = (inner+outer)/(vertical*2);
+}
+
+
+StereoCombiner::Frustum::Frustum():
+ left(-1),
+ right(1),
+ bottom(-1),
+ top(1)
+{ }
+
+StereoCombiner::Frustum::Frustum(float l, float r, float b, float t):
+ left(l),
+ right(r),
+ bottom(b),
+ top(t)