1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:23:53 +00:00

pause 3d rendering while the video plays

This commit is contained in:
scrawl 2012-12-12 01:30:34 +01:00
parent faad64b254
commit fe384a1600

View file

@ -816,6 +816,17 @@ namespace MWRender
MWBase::Environment::get().getWindowManager ()->pushGuiMode (MWGui::GM_Video);
// Turn off rendering except the GUI
mSceneMgr->clearSpecialCaseRenderQueues();
// SCRQM_INCLUDE with RENDER_QUEUE_OVERLAY does not work.
for (int i = 0; i < Ogre::RENDER_QUEUE_MAX; ++i)
{
if (i > 0 && i < 96)
mSceneMgr->addSpecialCaseRenderQueue(i);
}
mSceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
mState = new VideoState;
// Register all formats and codecs
@ -861,6 +872,9 @@ namespace MWRender
mRectangle->setVisible (false);
MWBase::Environment::get().getWindowManager ()->removeGuiMode (MWGui::GM_Video);
mSceneMgr->clearSpecialCaseRenderQueues();
mSceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
}
bool VideoPlayer::isPlaying ()