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
This commit is contained in:
@@ -1238,9 +1238,9 @@ void CullVisitor::apply(Transform& node)
|
||||
StateSet* node_state = node.getStateSet();
|
||||
if (node_state) pushStateSet(node_state);
|
||||
|
||||
ref_ptr<RefMatrix> 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<RefMatrix> matrix = createOrReuseMatrix(node.getMatrix());
|
||||
pushProjectionMatrix(matrix.get());
|
||||
RefMatrix *matrix = createOrReuseMatrix(node.getMatrix());
|
||||
pushProjectionMatrix(matrix);
|
||||
|
||||
//OSG_INFO<<"Push projection "<<*matrix<<std::endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user