From 01e87939a4a037e4d159c8145a0a1b042b7749f6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 26 May 2015 17:09:25 +0000 Subject: [PATCH] From Farshid Lashkari and Robert Osfield, "a small change to the CullVisitor class, which will use cloneType() on the root render stage when creating children render stages. This allows us to pass a custom RenderStage object to the SceneView and have it used for all sub-stages." git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14872 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgUtil/CullVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 22d8b992a..2e696cf24 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -1565,7 +1565,7 @@ void CullVisitor::apply(osg::Camera& camera) { OpenThreads::ScopedLock lock(*(camera.getDataChangeMutex())); - rtts = new osgUtil::RenderStage; + rtts = _rootRenderStage.valid() ? osg::cloneType(_rootRenderStage.get()) : new osgUtil::RenderStage; rsCache->setRenderStage(this,rtts.get()); rtts->setCamera(&camera);