Skip to content

Commit

Permalink
Fixed DearIMGUI debug assert - missing EndFrame()
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp authored and Petr Ohlídal committed Dec 3, 2021
1 parent 52a2f86 commit 627d85b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions source/main/gui/imgui/OgreImGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,18 @@ void OgreImGui::renderQueueStarted(Ogre::uint8 queueGroupId,
Ogre::Viewport* vp = Ogre::Root::getSingletonPtr()->getRenderSystem()->_getViewport();
if(vp != NULL)
{
Ogre::SceneManager* sceneMgr = vp->getCamera()->getSceneManager();
if (vp->getOverlaysEnabled() && sceneMgr->_getCurrentRenderStage() != Ogre::SceneManager::IRS_RENDER_TO_TEXTURE)
if (vp->getOverlaysEnabled())
{
//ORIG//Ogre::OverlayManager::getSingleton()._queueOverlaysForRendering(vp->getCamera(), sceneMgr->getRenderQueue(), vp);
m_imgui_overlay->_findVisibleObjects(vp->getCamera(), sceneMgr->getRenderQueue(), vp);
Ogre::SceneManager* sceneMgr = vp->getCamera()->getSceneManager();
if (sceneMgr->_getCurrentRenderStage() != Ogre::SceneManager::IRS_RENDER_TO_TEXTURE)
{
//ORIG//Ogre::OverlayManager::getSingleton()._queueOverlaysForRendering(vp->getCamera(), sceneMgr->getRenderQueue(), vp);
m_imgui_overlay->_findVisibleObjects(vp->getCamera(), sceneMgr->getRenderQueue(), vp);
}
}
else
{
ImGui::EndFrame(); // Rendering won't happen - end frame manually.
}
}
}
Expand Down

0 comments on commit 627d85b

Please # to comment.