X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Flibovr%2Flibovrcombiner.cpp;fp=source%2Flibovr%2Flibovrcombiner.cpp;h=fc3ed6765aa86c33df14bc259df5fdc78b908e53;hp=5eddb4a2f91e959065119b180a70f664515edca6;hb=a0a8e3a7c5a229dcccd1af3a3edeac5ba8156954;hpb=81d7a9bad0313e06ed154734d3f2a3120b26b6db diff --git a/source/libovr/libovrcombiner.cpp b/source/libovr/libovrcombiner.cpp index 5eddb4a..fc3ed67 100644 --- a/source/libovr/libovrcombiner.cpp +++ b/source/libovr/libovrcombiner.cpp @@ -82,13 +82,13 @@ struct LibOVRCombiner::Frustum: StereoCombiner::Frustum LibOVRCombiner::LibOVRCombiner(LibOVRSystem &d, GL::View &v): - device(d), + system(d), view(v), left_mesh((GL::VERTEX2, GL::TEXCOORD2,0, GL::TEXCOORD2,1, GL::TEXCOORD2,2, GL::TEXCOORD2,3)), right_mesh((GL::VERTEX2, GL::TEXCOORD2,0, GL::TEXCOORD2,1, GL::TEXCOORD2,2, GL::TEXCOORD2,3)), shprog(vs_source, fs_source) { - ovrHmd hmd = device.get_private().ovr_hmd; + ovrHmd hmd = system.get_private().ovr_hmd; ovrFovPort left_fov = hmd->DefaultEyeFov[ovrEye_Left]; ovrFovPort right_fov = hmd->DefaultEyeFov[ovrEye_Right]; @@ -122,24 +122,24 @@ LibOVRCombiner::LibOVRCombiner(LibOVRSystem &d, GL::View &v): right_shdata.uniform("uv_scale", uv_scale_offset[0].x, -uv_scale_offset[0].y); right_shdata.uniform("uv_offset", uv_scale_offset[1].x, 1-uv_scale_offset[1].y); - device.configure_window(view.get_window()); + system.configure_window(view.get_window()); } void LibOVRCombiner::prepare() const { - device.begin_frame(); + system.begin_frame(); } void LibOVRCombiner::render(const GL::Texture2D &left, const GL::Texture2D &right) const { GL::Bind bind_shprog(shprog); - ovrHmd hmd = device.get_private().ovr_hmd; + ovrHmd hmd = system.get_private().ovr_hmd; - if(device.is_timing_active()) + if(system.is_timing_active()) { - ovr_WaitTillTime(device.get_timewarp_time()); - ovrTrackingState state = ovrHmd_GetTrackingState(hmd, device.get_tracking_time()); + ovr_WaitTillTime(system.get_timewarp_time()); + ovrTrackingState state = ovrHmd_GetTrackingState(hmd, system.get_tracking_time()); ovrMatrix4f matrices[2]; ovrHmd_GetEyeTimewarpMatrices(hmd, ovrEye_Left, state.HeadPose.ThePose, matrices); @@ -164,7 +164,7 @@ void LibOVRCombiner::render(const GL::Texture2D &left, const GL::Texture2D &righ right_mesh.draw(); view.get_context().swap_buffers(); - device.end_frame(); + system.end_frame(); }