用的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中进一步处理 大概流程就这样
本文介绍了使用Ogre 1.8.1版本进行游戏开发时的初始化流程,包括创建根窗口、设置输入监听、加载资源等关键步骤,并概述了消息循环的处理方式。
3844

被折叠的 条评论
为什么被折叠?



