Operating System: Windows 10
Render System: DirectX11
Hi all,
Should I call
Code: Select all
Ogre::Root::destroyRenderTarget()
Code: Select all
Ogre::Root::createRenderWindow()
I'm asking you this question because I have a problem destroying render windows in the following case:
- Create first window via Ogre::Root::createRenderWindow(). This window is assigned as a main window internally by OGRE itself.
- Create second window via Ogre::Root::createRenderWindow().
- Destroy first window via Ogre::Root::destroyRenderTarget(). As it was the main window the mMainWindow pointer is NULL now.
- Create new window via Ogre::Root::createRenderWindow(). OGRE thinks that this is a new main window but crashes on D3D11TextureManager constructor as it is a singleton that was already created before (on the first call to Ogre::Root::createRenderWindow).
Code: Select all
Singleton( void )
{
assert( !msSingleton );
// ...
}
Thanks.