void System::_createSceneManager(void) { mSceneManager = mRoot->createSceneManager(Ogre::ST_GENERIC, "FairyMainScene"); const char* s = getenv("Fairy_Hack"); if (s) { if (strstr(s, "X-Ray") != 0) { static FairyRenderQueueListener sFairyRenderQueueListener; mSceneManager->addRenderQueueListener(&sFairyRenderQueueListener); } } Ogre::RenderQueue* rq = mSceneManager->getRenderQueue(); //david-<< // Disable shadows for all future groups //rq->setEnableShadowsForUnregisteredGroup(false); //david->> // Disable shadow for all registered render queue group Ogre::RenderQueue::QueueGroupIterator it = rq->_getQueueGroupIterator(); while (it.hasMoreElements()) { Ogre::uint8 qid = it.peekNextKey(); Ogre::RenderQueueGroup* group = it.getNext(); group->setShadowsEnabled(false); } // Only enable shadows for world geometry at the moment rq->getQueueGroup(mSceneManager->getWorldGeometryRenderQueue())->setShadowsEnabled(true); }
bool CCoreSystem::createScene(void) { m_pSceneMgr = m_pOgreRoot->createSceneManager(Ogre::ST_GENERIC, "MainSceneMgr"); assert(m_pSceneMgr); Ogre::RenderQueue* rq = m_pSceneMgr->getRenderQueue(); // Disable shadows for all future groups //rq->setEnableShadowsForUnregisteredGroup(false); // Disable shadow for all registered render queue group Ogre::RenderQueue::QueueGroupIterator it = rq->_getQueueGroupIterator(); while (it.hasMoreElements()) { Ogre::uint8 qid = it.peekNextKey(); Ogre::RenderQueueGroup* group = it.getNext(); group->setShadowsEnabled(false); } return true; }