From d3945d52109da26d39c467aea5f1942f8caa39a4 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 21 Jul 2014 14:32:40 +0000 Subject: [PATCH] From Pjotr Svetachov, "I think I spotted some unneeded ref_ptrs in the cullvisitor. The call pushModelViewMatrix or pushProjectionMatrix will already keep the reference when adding it to the MatrixStack. In CullVisitor::apply methods for the billboard and the camera you already take a pointer instead of a ref_ptr." git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14375 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgUtil/CullVisitor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 9afe65f4b..2f3783901 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -1238,9 +1238,9 @@ void CullVisitor::apply(Transform& node) StateSet* node_state = node.getStateSet(); if (node_state) pushStateSet(node_state); - ref_ptr matrix = createOrReuseMatrix(*getModelViewMatrix()); + RefMatrix* matrix = createOrReuseMatrix(*getModelViewMatrix()); node.computeLocalToWorldMatrix(*matrix,this); - pushModelViewMatrix(matrix.get(), node.getReferenceFrame()); + pushModelViewMatrix(matrix, node.getReferenceFrame()); handle_cull_callbacks_and_traverse(node); @@ -1279,8 +1279,8 @@ void CullVisitor::apply(Projection& node) _computed_zfar = -FLT_MAX; - ref_ptr matrix = createOrReuseMatrix(node.getMatrix()); - pushProjectionMatrix(matrix.get()); + RefMatrix *matrix = createOrReuseMatrix(node.getMatrix()); + pushProjectionMatrix(matrix); //OSG_INFO<<"Push projection "<<*matrix<