Replaced dynamoc_cast<osg::CullStack*> with asCullStack() to improve performance of AutoTransform, screen size based LOD and PagedLOD.

This commit is contained in:
Robert Osfield
2017-04-26 17:10:58 +01:00
parent 92092a56ae
commit a95d66a587
5 changed files with 20 additions and 3 deletions

View File

@@ -150,7 +150,7 @@ void PagedLOD::traverse(NodeVisitor& nv)
}
else
{
osg::CullStack* cullStack = dynamic_cast<osg::CullStack*>(&nv);
osg::CullStack* cullStack = nv.asCullStack();
if (cullStack && cullStack->getLODScale()>0.0f)
{
required_range = cullStack->clampedPixelSize(getBound()) / cullStack->getLODScale();