mako
15-03-2007 15:59:17
well
my program crash in this line with an access violation error.
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
it seems alright to me.
I'm using the BasicFrameLister that comes to the addon.
I've verified that my mWindow, mScenemgr and mWorld is initialized
I don't have a clue of what is wrong. or for what kind of error I should look.
my program crash in this line with an access violation error.
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
it seems alright to me.
I'm using the BasicFrameLister that comes to the addon.
BasicFrameListener::BasicFrameListener( Ogre::RenderWindow* win, Ogre::SceneManager* mgr, OgreNewt::World* W, int update_framerate) :
FrameListener()
{
m_World = W;
desired_framerate = update_framerate;
m_update = (Ogre::Real)(1.0f / (Ogre::Real)desired_framerate);
m_elapsed = 0.0f;
// add the standard debug viewer.
Debugger::getSingleton().init( mgr );
OIS::ParamList pl;
size_t windowHnd = 0;
std::ostringstream windowHndStr;
win->getCustomAttribute("WINDOW", &windowHnd);
windowHndStr << windowHnd;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem( pl );
//Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject( OIS::OISKeyboard, false ));
}
I've verified that my mWindow, mScenemgr and mWorld is initialized
if(mWindow && mSceneMgr && mWorld)
mOgreNewtListener = new OgreNewt::BasicFrameListener(mWindow,mSceneMgr,mWorld, 30);
I don't have a clue of what is wrong. or for what kind of error I should look.