[SOLVED] CEGUI 0.7, Ogre 1.6.4 Exception
Posted: Tue Oct 27, 2009 08:59
CEGUI 0.7.x SVN
Ogre: 1.6.4 SVN
MSVS 9
I was able to get the Ogre provided Demo_GUI working with CEGUI 0.7. However, when I ported the same CEGUI initialization to our application I keep getting an exception thrown (NULL pointer) when we execute Ogre::Root::startRendering().
The exception is occurring in OgreD3D9RenderSystem.cpp at line 2285 in Ogre::D3D9RenderSystem::_setCullingMode( CullingMode mode ):
mActiveRenderTarget is NULL when traced in debug
That function is being called from line 301 in OgreRenderer::beginRendering():
I thought maybe it was because we didn't specify a an Ogre::RenderTarget in the CEGUI::OgreRenderer::bootstrapSystem() call but that didn't seem to help either.
Does someone have an idea of what might be happening? I'm sure it's something I'm doing wrong as the Ogre Demo_GUI works just fine. We are doing the exact same initialization so we are at a loss of what might be going wrong:
Ogre: 1.6.4 SVN
MSVS 9
CEGUI.Log wrote:27/10/2009 07:16:04 (Std) ********************************************************************************
27/10/2009 07:16:04 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
27/10/2009 07:16:04 (Std) ********************************************************************************
27/10/2009 07:16:04 (Std) ---- Version 0.7.9999 (Build: Oct 27 2009 Microsoft Windows MSVC++ 9.0 32 bit) ----
27/10/2009 07:16:04 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
27/10/2009 07:16:04 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
27/10/2009 07:16:04 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
27/10/2009 07:16:04 (Std) ---- Scripting module is: None ----
27/10/2009 07:16:04 (Std) ********************************************************************************
27/10/2009 07:16:04 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
27/10/2009 07:16:04 (Std) ********************************************************************************
I was able to get the Ogre provided Demo_GUI working with CEGUI 0.7. However, when I ported the same CEGUI initialization to our application I keep getting an exception thrown (NULL pointer) when we execute Ogre::Root::startRendering().
Code: Select all
Unhandled exception at 0x02cbfeda (RenderSystem_Direct3D9_d.dll) in Client.exe: 0xC0000005: Access violation reading location 0x00000000.
The exception is occurring in OgreD3D9RenderSystem.cpp at line 2285 in Ogre::D3D9RenderSystem::_setCullingMode( CullingMode mode ):
Code: Select all
bool flip = ((mActiveRenderTarget->requiresTextureFlipping() && !mInvertVertexWinding) ||
(!mActiveRenderTarget->requiresTextureFlipping() && mInvertVertexWinding));
mActiveRenderTarget is NULL when traced in debug
That function is being called from line 301 in OgreRenderer::beginRendering():
Code: Select all
d_renderSystem->_setCullingMode(CULL_NONE);
I thought maybe it was because we didn't specify a an Ogre::RenderTarget in the CEGUI::OgreRenderer::bootstrapSystem() call but that didn't seem to help either.
Does someone have an idea of what might be happening? I'm sure it's something I'm doing wrong as the Ogre Demo_GUI works just fine. We are doing the exact same initialization so we are at a loss of what might be going wrong:
Code: Select all
// Initialize the CEGUI system
Ogre::RenderTarget &mRenderTarget = *mGlobalResource->OgreDefaultViewPort->getTarget();
mGlobalResource->CEGUIRenderer = &CEGUI::OgreRenderer::bootstrapSystem( mRenderTarget );