From 945846a3ed52cdf186d3e462d6a423224721db99 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 18 Mar 2008 17:44:21 +0000 Subject: [PATCH] Set the CullSettings::InhertianceMask to 0x0 as temporary measure till we work out the best scheme to use w.r.t inhertiance of CullSettins. --- src/osgShadow/ParallelSplitShadowMap.cpp | 3 ++- src/osgShadow/ShadowMap.cpp | 4 ++++ src/osgShadow/ShadowTexture.cpp | 2 ++ src/osgShadow/SoftShadowMap.cpp | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osgShadow/ParallelSplitShadowMap.cpp b/src/osgShadow/ParallelSplitShadowMap.cpp index 6432b28dc..3b04943ee 100644 --- a/src/osgShadow/ParallelSplitShadowMap.cpp +++ b/src/osgShadow/ParallelSplitShadowMap.cpp @@ -239,7 +239,7 @@ void ParallelSplitShadowMap::init(){ { // create the camera pssmShadowSplitTexture._camera = new osg::Camera; - + pssmShadowSplitTexture._camera->setInheritanceMask(0x0); pssmShadowSplitTexture._camera->setCullCallback(new CameraCullCallback(this)); #ifndef SHADOW_TEXTURE_DEBUG @@ -442,6 +442,7 @@ void ParallelSplitShadowMap::init(){ pssmShadowSplitTexture._debug_texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); // create the camera pssmShadowSplitTexture._debug_camera = new osg::Camera; + pssmShadowSplitTexture._debug_camera->setInheritanceMask(0x0); pssmShadowSplitTexture._debug_camera->setCullCallback(new CameraCullCallback(this)); pssmShadowSplitTexture._debug_camera->setClearMask(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT); pssmShadowSplitTexture._debug_camera->setClearColor(osg::Vec4(1.0,1.0,1.0,1.0)); diff --git a/src/osgShadow/ShadowMap.cpp b/src/osgShadow/ShadowMap.cpp index fe1796b71..e5158d795 100644 --- a/src/osgShadow/ShadowMap.cpp +++ b/src/osgShadow/ShadowMap.cpp @@ -182,6 +182,8 @@ void ShadowMap::init() // create the camera _camera = new osg::Camera; + _camera->setInheritanceMask(0x0); + _camera->setReferenceFrame(osg::Camera::ABSOLUTE_RF_INHERIT_VIEWPOINT); _camera->setCullCallback(new CameraCullCallback(this)); @@ -549,6 +551,8 @@ osg::ref_ptr ShadowMap::makeDebugHUD() osg::ref_ptr camera = new osg::Camera; + camera->setInheritanceMask(0x0); + osg::Vec2 size(1280, 1024); // set the projection matrix camera->setProjectionMatrix(osg::Matrix::ortho2D(0,size.x(),0,size.y())); diff --git a/src/osgShadow/ShadowTexture.cpp b/src/osgShadow/ShadowTexture.cpp index 11c1a872e..de19a98ce 100644 --- a/src/osgShadow/ShadowTexture.cpp +++ b/src/osgShadow/ShadowTexture.cpp @@ -56,6 +56,8 @@ void ShadowTexture::init() // create the camera _camera = new osg::Camera; + // _camera->setInheritanceMask(0x0); + _camera->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); _camera->setCullCallback(new CameraCullCallback(this)); diff --git a/src/osgShadow/SoftShadowMap.cpp b/src/osgShadow/SoftShadowMap.cpp index 78f04a608..4bc1457db 100755 --- a/src/osgShadow/SoftShadowMap.cpp +++ b/src/osgShadow/SoftShadowMap.cpp @@ -232,6 +232,7 @@ void SoftShadowMap::init() // create the camera _camera = new osg::Camera; + _camera->setInheritanceMask(0x0); _camera->setCullCallback(new CameraCullCallback(this)); _camera->setClearMask(GL_DEPTH_BUFFER_BIT);