From a16568254c3ba9c0c01c049a7d6fe94dfc7ea3ab Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 12 Aug 2006 18:19:43 +0000 Subject: [PATCH] Moved reset to 0 of _createReuseMatrixIndex from CullVistor.cpp to CullStack.cpp so that CullStack::reset works correctly for all subclasses - fixing a memory consumption issue with occluders --- src/osg/CullStack.cpp | 2 ++ src/osgUtil/CullVisitor.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osg/CullStack.cpp b/src/osg/CullStack.cpp index e2e491c52..a5149869a 100644 --- a/src/osg/CullStack.cpp +++ b/src/osg/CullStack.cpp @@ -59,6 +59,8 @@ void CullStack::reset() (lookVector.z()>=0?4:0); _bbCornerNear = (~_bbCornerFar)&7; + + _currentReuseMatrixIndex=0; } diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 7a0d3c1ea..077c7ccbf 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -142,7 +142,6 @@ void CullVisitor::reset() } // reset the resuse lists. - _currentReuseMatrixIndex = 0; _currentReuseRenderLeafIndex = 0; _nearPlaneCandidateMap.clear();