用的ogre 版本是1.8.1
入口samplebrowser.cpp 创建samplebrowser go-> initApp(initialSample);->createRoot();创建root
-》setup();
-》 mWindow = createWindow();
setupInput();
locateResources();
loadResources();
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
// adds context as listener to process context-level (above the sample level) events
mRoot->addFrameListener(this);
Ogre::WindowEventUtilities::addWindowEventListener(mWindow, this);
-》在上边createinput的时候添加监听函数
mKeyboard->setEventCallback(this);
mMouse->setEventCallback(this);
-》之后开始start rending并开始运行程序进入消息循环
在上述消息方法中把消息传入sample中进一步处理 大概流程就这样