]> git.tdb.fi Git - libs/vr.git/commitdiff
Simplify hmd handle access in a couple of places
authorMikko Rasa <tdb@tdb.fi>
Tue, 23 Dec 2014 20:44:49 +0000 (22:44 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 23 Dec 2014 20:44:49 +0000 (22:44 +0200)
source/oculusriftcamera.cpp
source/oculusriftcombiner.cpp

index 33ed07f261dc35180b5a0dc88727f6ea0be6782e..3aa35be1f8c672c218d82f5ad1b30231d2736018 100644 (file)
@@ -9,9 +9,8 @@ OculusRiftCamera::OculusRiftCamera(const OculusRiftDevice &d, const GL::Camera &
        device(d),
        base_camera(c)
 {
-       const OculusRiftDevice::Private &dev_priv = device.get_private();
        unsigned supported = ovrTrackingCap_Orientation|ovrTrackingCap_MagYawCorrection|ovrTrackingCap_Position;
-       ovrHmd_ConfigureTracking(dev_priv.ovr_hmd, supported, 0);
+       ovrHmd_ConfigureTracking(device.get_private().ovr_hmd, supported, 0);
 }
 
 void OculusRiftCamera::reset_tracking()
index 86d32b031d6b2f590920a6a1ddd649d65071b10a..5e76cc8305a21ee6c3594ee666d9d50076016ade 100644 (file)
@@ -82,8 +82,7 @@ OculusRiftCombiner::OculusRiftCombiner(const OculusRiftDevice &d):
        right_mesh((GL::VERTEX2, GL::TEXCOORD2,0, GL::TEXCOORD2,1, GL::TEXCOORD2,2, GL::TEXCOORD1,3)),
        shprog(vs_source, fs_source)
 {
-       const OculusRiftDevice::Private &dev_priv = device.get_private();
-       ovrHmd hmd = dev_priv.ovr_hmd;
+       ovrHmd hmd = device.get_private().ovr_hmd;
 
        ovrFovPort left_fov = hmd->DefaultEyeFov[ovrEye_Left];
        ovrFovPort right_fov = hmd->DefaultEyeFov[ovrEye_Right];