mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
Addressing the actual gcc bug
This commit is contained in:
parent
44238d02ae
commit
69937d21f2
2 changed files with 8 additions and 5 deletions
|
@ -122,9 +122,8 @@ void TV3DManager::display(Camera& whichCamera) {
|
||||||
qApp->displaySide(eyeCamera, false, RenderArgs::MONO);
|
qApp->displaySide(eyeCamera, false, RenderArgs::MONO);
|
||||||
qApp->getApplicationOverlay().displayOverlayTextureStereo(whichCamera, _aspect, fov);
|
qApp->getApplicationOverlay().displayOverlayTextureStereo(whichCamera, _aspect, fov);
|
||||||
_activeEye = NULL;
|
_activeEye = NULL;
|
||||||
|
}, [&]{
|
||||||
// HACK: the gcc compiler didn't like a pair of lambdas in the forEachEye template
|
// render right side view
|
||||||
// Adjust viewport for next view
|
|
||||||
portalX = deviceSize.width() / 2;
|
portalX = deviceSize.width() / 2;
|
||||||
});
|
});
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
|
@ -49,9 +49,13 @@ private:
|
||||||
// while the second is code to be executed between the two eyes.
|
// while the second is code to be executed between the two eyes.
|
||||||
// The use case here is to modify the output viewport coordinates
|
// The use case here is to modify the output viewport coordinates
|
||||||
// for the new eye.
|
// for the new eye.
|
||||||
template<typename F>
|
// FIXME: we'd like to have a default empty lambda for the second parameter,
|
||||||
static void forEachEye(F f) {
|
// 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<typename F, typename FF>
|
||||||
|
static void forEachEye(F f, FF ff) {
|
||||||
f(_leftEye);
|
f(_leftEye);
|
||||||
|
ff();
|
||||||
f(_rightEye);
|
f(_rightEye);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue