Exemplo n.º 1
0
void RttManager::CGPUNormalMapListener::postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt)
{
  mRttManager->mHydrax->getMesh()->setMaterialName(mOldMaterialName);

  Ogre::SceneManager *mSceneMgr = mRttManager->mHydrax->getSceneManager();

  // Render all
  mSceneMgr->clearSpecialCaseRenderQueues();
  mSceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
}
Exemplo n.º 2
0
void RttManager::CGPUNormalMapListener::preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt)
{
  mOldMaterialName = mRttManager->mHydrax->getMesh()->getMaterialName();
  mRttManager->mHydrax->getMesh()->setMaterialName(mRttManager->mHydrax->getGPUNormalMapManager()->getNormalMapMaterial()->getName());

  Ogre::SceneManager *mSceneMgr = mRttManager->mHydrax->getSceneManager();

  // Render only the Hydrax mesh(Ogre::RENDER_QUEUE_1)
  mSceneMgr->clearSpecialCaseRenderQueues();
  mSceneMgr->addSpecialCaseRenderQueue(Ogre::RENDER_QUEUE_1);
  mSceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_INCLUDE);
}