mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Ensure TerrainDrawables affect the computed near/far planes.
This commit is contained in:
parent
bf9a1ded63
commit
112ade2a3f
@ -47,6 +47,12 @@ void TerrainDrawable::cull(osgUtil::CullVisitor *cv)
|
||||
|
||||
osg::RefMatrix& matrix = *cv->getModelViewMatrix();
|
||||
|
||||
if (cv->getComputeNearFarMode() && bb.valid())
|
||||
{
|
||||
if (!cv->updateCalculatedNearFar(matrix, *this, false))
|
||||
return;
|
||||
}
|
||||
|
||||
float depth = bb.valid() ? distance(bb.center(),matrix) : 0.0f;
|
||||
if (osg::isNaN(depth))
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user