My name's Max and I'm new to the ogre forums. I registered to ask a question I couldn't find using the search function. At the moment I'm trying to build a menu using the OgreBites SdkTrayManager. I initialized the whole thing, like the Frameworks provided do and it does compile correctly. When I'm running the program thou, I'm getting following error in the LOG and the game closes immediately:
I looked for several reasons, therefor I checked if the resource.cfg is loaded correctly and the resources are initialized and they are. When I'm checking the Resources with a debugger the SdkTrays.zip is loaded and it finds an array with all the zip-containing .overlay, .material, and .png, such as sdk_cursor.png.18:16:55: OGRE EXCEPTION(5:ItemIdentityException): OverlayElement with name SdkTrays/Cursor not found. in OverlayManager::getOverlayElementImpl at ..\..\..\Components\Overlay\src\OgreOverlayManager.cpp (line 611)
18:16:55: ERROR: OGRE EXCEPTION(5:ItemIdentityException): OverlayElement with name SdkTrays/Cursor not found. in OverlayManager::getOverlayElementImpl at ..\..\..\Components\Overlay\src\OgreOverlayManager.cpp (line 611)
Additionaly to that the frameworks seem to be for SDK 1.8.0, since I had to initialize the OverlaySystem instead of just declaring it. If I'm not initializing I'm getting a msSingleton Error on running the game.
But to clarify my situation, here are the classes regarding that problem:
MenuAbstract (AbstractClass for all Menu's)
Code: Select all
CMenuAbstract::CMenuAbstract(void) : CSceneAbstract()
{
this->m_TrayManager = 0;
#ifdef OGRE_EXTERNAL_OVERLAY
this->m_OverlaySystem = new Ogre::OverlaySystem();
OgreBites::InputContext input;
input.mAccelerometer = NULL;
input.mKeyboard = this->m_Keyboard;
input.mMouse = this->m_Mouse;
input.mMultiTouch = NULL;
Ogre::ResourceGroupManager::getSingletonPtr()->initialiseAllResourceGroups();
Ogre::StringVectorPtr list = Ogre::ResourceGroupManager::getSingletonPtr()->listResourceNames("Essential");
this->m_TrayManager = new OgreBites::SdkTrayManager("MenuTrayManager", CGame::getSingletonPtr()->m_RenderWindow, input, this);
#else
this->m_TrayManager = new OgreBites::SdkTrayManager("MenuTrayManager", CGame::getSingletonPtr()->m_RenderWindow, this->m_Mouse, this);
#endif
}
Code: Select all
CSceneAbstract::CSceneAbstract(void)
:
m_InputManager(0),
m_Mouse(0),
m_Keyboard(0),
m_SceneManager(0),
m_Viewport(0),
m_Camera(0),
m_CameraMan(0)
{
this->m_SceneManager = CGame::getSingletonPtr()->m_Root->createSceneManager(Ogre::ST_GENERIC);
try
{
size_t windowHnd;
Ogre::Root::getSingletonPtr()->getAutoCreatedWindow()->getCustomAttribute("WINDOW", &windowHnd);
Ogre::String windowHandleAsString = "";
std::ostringstream windowHndStr;
windowHndStr << windowHnd;
windowHandleAsString = windowHndStr.str();
OIS::ParamList lSpecialParameters;
lSpecialParameters.insert(std::make_pair(std::string("WINDOW"), windowHandleAsString));
this->m_InputManager = OIS::InputManager::createInputSystem(lSpecialParameters);
this->m_Mouse = static_cast<OIS::Mouse*>(this->m_InputManager->createInputObject(OIS::OISMouse, true));
this->m_Keyboard = static_cast<OIS::Keyboard*>(this->m_InputManager->createInputObject(OIS::OISKeyboard, true));
this->m_Mouse->setEventCallback(this);
this->m_Keyboard->setEventCallback(this);
Ogre::WindowEventUtilities::addWindowEventListener(CGame::getSingletonPtr()->m_RenderWindow, this);
CGame::getSingletonPtr()->m_Root->addFrameListener(this);
CGame::getSingletonPtr()->m_RenderWindow->setActive(true);
}
catch(Ogre::Exception& ex)
{
Ogre::LogManager::getSingletonPtr()->logMessage(Ogre::LogMessageLevel::LML_CRITICAL, "FEHLER! Fehler beim Sicherstellen des Capturing");
Ogre::LogManager::getSingletonPtr()->logMessage(Ogre::LogMessageLevel::LML_CRITICAL, ex.getFullDescription());
}
}
this->m_TrayManager = new OgreBites::SdkTrayManager("MenuTrayManager", CGame::getSingletonPtr()->m_RenderWindow, input, this);
is called and shutting down right here.
Additionaly here's my Ogre.log:
Ogre.log
Here are some information about my system as well:
Windows 8 x64
Ogre 1.9.0 x86
Boost 1.54
Another way of getting rid off the Cursor problem is described here:
Second Solution
But this also didn't help, I'm still getting the error.
The rest of my game is running quit fine, since I can build different scenes, like Levels without any problems and can even change between two different scenes using different game states.
So it might be a 1.9.0 problem. Anybody got any information about anything new here or how I can bypass the problem?
Thanks
Max =)
//Edit:
Here's a picture of the loaded resources:
Loaded Resources