};
-OpenVRCombiner::OpenVRCombiner(OpenVRDevice &d):
- device(d)
+OpenVRCombiner::OpenVRCombiner(OpenVRDevice &d, GL::View &v):
+ device(d),
+ view(v)
{
vr::IVRSystem *vr_sys = vr::VRSystem();
uint32_t w, h;
Frustum left_frustum = Private::get_projection(vr::Eye_Left);
Frustum right_frustum = Private::get_projection(vr::Eye_Right);
configure_eye_frustums(left_frustum, right_frustum);
+
+ set_mirroring(true);
}
void OpenVRCombiner::prepare() const
compositor->Submit(vr::Eye_Left, &tex);
tex.handle = reinterpret_cast<void *>(right.get_id());
compositor->Submit(vr::Eye_Right, &tex);
+
+ if(mirror)
+ {
+ mirror->shdata.uniform("scale", view.get_aspect()/render_aspect/2, 0.5f);
+ render_mirror(left);
+ view.get_context().swap_buffers();
+ }
}