From 69937d21f250a37338598a78f6d559bfe885c077 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 11 May 2015 14:40:10 -0700 Subject: [PATCH] Addressing the actual gcc bug --- interface/src/devices/TV3DManager.cpp | 5 ++--- interface/src/devices/TV3DManager.h | 8 ++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/interface/src/devices/TV3DManager.cpp b/interface/src/devices/TV3DManager.cpp index e01b4aace3..751a3d16bb 100644 --- a/interface/src/devices/TV3DManager.cpp +++ b/interface/src/devices/TV3DManager.cpp @@ -122,9 +122,8 @@ void TV3DManager::display(Camera& whichCamera) { qApp->displaySide(eyeCamera, false, RenderArgs::MONO); qApp->getApplicationOverlay().displayOverlayTextureStereo(whichCamera, _aspect, fov); _activeEye = NULL; - - // HACK: the gcc compiler didn't like a pair of lambdas in the forEachEye template - // Adjust viewport for next view + }, [&]{ + // render right side view portalX = deviceSize.width() / 2; }); glPopMatrix(); diff --git a/interface/src/devices/TV3DManager.h b/interface/src/devices/TV3DManager.h index ddebcd7eec..26a57ae259 100644 --- a/interface/src/devices/TV3DManager.h +++ b/interface/src/devices/TV3DManager.h @@ -49,9 +49,13 @@ private: // while the second is code to be executed between the two eyes. // The use case here is to modify the output viewport coordinates // for the new eye. - template - static void forEachEye(F f) { + // FIXME: we'd like to have a default empty lambda for the second parameter, + // but gcc 4.8.1 complains about it due to a bug. See + // http://stackoverflow.com/questions/25490662/lambda-as-default-parameter-to-a-member-function-template + template + static void forEachEye(F f, FF ff) { f(_leftEye); + ff(); f(_rightEye); } };