#279 Workaround for invalid near plane location detected on Linux

This commit is contained in:
Magne Sjaastad 2016-09-01 13:02:33 +02:00
parent 1b38326d83
commit 8098578545

View File

@ -407,6 +407,10 @@ void caf::Viewer::optimizeClippingPlanes()
}
#endif
// TODO: Investigate why this is needed on Linux
// When loading grid files on Linux, the nearPlaneDist results in 0 at this point
nearPlaneDist = CVF_MAX(m_minNearPlaneDistance, nearPlaneDist);
if (farPlaneDist <= nearPlaneDist) farPlaneDist = nearPlaneDist + 1.0;
if (m_mainCamera->projection() == cvf::Camera::PERSPECTIVE)