Add names to several nodes for debugging purposes

pull/1198/head
scrawl 8 years ago
parent 851f61ac82
commit c5f8ff6e0e

@ -484,6 +484,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
std::string myguiResources = (mResDir / "mygui").string();
osg::ref_ptr<osg::Group> guiRoot = new osg::Group;
guiRoot->setName("GUI Root");
guiRoot->setNodeMask(MWRender::Mask_GUI);
rootNode->addChild(guiRoot);
MWGui::WindowManager* window = new MWGui::WindowManager(mViewer, guiRoot, mResourceSystem.get(),

@ -93,6 +93,7 @@ namespace MWRender
mCamera->setViewport(0, 0, sizeX, sizeY);
mCamera->setRenderOrder(osg::Camera::PRE_RENDER);
mCamera->attach(osg::Camera::COLOR_BUFFER, mTexture);
mCamera->setName("CharacterPreview");
mCamera->setNodeMask(Mask_RenderToTexture);

@ -46,6 +46,7 @@ void Objects::insertBegin(const MWWorld::Ptr& ptr)
if (found == mCellSceneNodes.end())
{
cellnode = new osg::Group;
cellnode->setName("Cell Root");
mRootNode->addChild(cellnode);
mCellSceneNodes[ptr.getCell()] = cellnode;
}

@ -793,6 +793,7 @@ namespace MWRender
{
mPlayerNode = new SceneUtil::PositionAttitudeTransform;
mPlayerNode->setNodeMask(Mask_Player);
mPlayerNode->setName("Player Root");
mSceneRoot->addChild(mPlayerNode);
}

@ -1113,6 +1113,7 @@ SkyManager::SkyManager(osg::Group* parentNode, Resource::SceneManager* sceneMana
, mSunEnabled(true)
{
osg::ref_ptr<CameraRelativeTransform> skyroot (new CameraRelativeTransform);
skyroot->setName("Sky Root");
// Assign empty program to specify we don't want shaders
// The shaders generated by the SceneManager can't handle everything we need
skyroot->getOrCreateStateSet()->setAttributeAndModes(new osg::Program(), osg::StateAttribute::OVERRIDE);

@ -223,6 +223,7 @@ public:
setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
setReferenceFrame(osg::Camera::RELATIVE_RF);
setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water"));
setName("RefractionCamera");
setCullMask(Mask_Effect|Mask_Scene|Mask_Terrain|Mask_Actor|Mask_ParticleSystem|Mask_Sky|Mask_Sun|Mask_Player|Mask_Lighting);
setNodeMask(Mask_RenderToTexture);
@ -305,6 +306,7 @@ public:
setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
setReferenceFrame(osg::Camera::RELATIVE_RF);
setSmallFeatureCullingPixelSize(Settings::Manager::getInt("small feature culling pixel size", "Water"));
setName("ReflectionCamera");
bool reflectActors = Settings::Manager::getBool("reflect actors", "Water");
@ -405,6 +407,7 @@ Water::Water(osg::Group *parent, osg::Group* sceneRoot, Resource::ResourceSystem
ico->add(mWaterGeom);
mWaterNode = new osg::PositionAttitudeTransform;
mWaterNode->setName("Water Root");
mWaterNode->addChild(mWaterGeom);
mWaterNode->addCullCallback(new FudgeCallback);

@ -18,6 +18,7 @@ World::World(osg::Group* parent, Resource::ResourceSystem* resourceSystem, osgUt
mTerrainRoot = new osg::Group;
mTerrainRoot->setNodeMask(nodeMask);
mTerrainRoot->getOrCreateStateSet()->setRenderingHint(osg::StateSet::OPAQUE_BIN);
mTerrainRoot->setName("Terrain Root");
mParent->addChild(mTerrainRoot);
}

Loading…
Cancel
Save