生活随笔
收集整理的這篇文章主要介紹了
ogre研究之第一个程序(一)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
第一次發(fā)送超過字?jǐn)?shù)了,被迫剪成兩篇!
上一篇我們介紹了如何搭建開發(fā)環(huán)境,并創(chuàng)建了一個空白的窗口程序。
這里我們主要是實現(xiàn)在程序中裝載一個簡單的模型并顯示出來。
首先看一下效果吧,(模型就是ogre例子中的robot.mesh),如下:
例子很簡單,代碼頁不多,就4行。我們還是一步一步來分析吧。
首先我們上一個項目中的OgreDemo1類繼承自ExampleApplication類,我們之所以什么都沒
有做就能創(chuàng)建一個窗口,就是因為ExampleApplication為我們實現(xiàn)了。
首先我們打開ExampleApplication類,可以看到包含了如下幾個成員變量(加入了少許注釋)
?Root?*mRoot;??? ??Camera*?mCamera;??? ??SceneManager*?mSceneMgr;??? ??ExampleFrameListener*?mFrameListener;??? ??RenderWindow*?mWindow;??? ??Ogre::String?mResourcePath;?? 這里的ExampleFrameListener類,如果你暫時還不清楚是做什么的,不要緊,后面我們慢慢介紹。
知道了這些成員變量,我們在返回OgreDemo1.c文件中看看入口函數(shù)WinMain中是如何書寫的呢?很簡單就一句話:
app.go();? 先將源代碼貼出來,加了詳細(xì)注意:
ExampleApplication.h
#ifndef?__ExampleApplication_H__??? ?#define?__ExampleApplication_H__??? ??? ?#include?"Ogre.h"??? ?#include?"OgreConfigFile.h"??? ?#include?"ExampleFrameListener.h"??? ??? ?#if?OGRE_PLATFORM?==?OGRE_PLATFORM_APPLE??? ?#include?<CoreFoundation/CoreFoundation.h>??? ??? ?std::string?macBundlePath()??? ?{??? ?????char?path[1024];??? ?????CFBundleRef?mainBundle?=?CFBundleGetMainBundle();??? ?????assert(mainBundle);??? ??? ?????CFURLRef?mainBundleURL?=?CFBundleCopyBundleURL(mainBundle);??? ?????assert(mainBundleURL);??? ??? ?????CFStringRef?cfStringRef?=?CFURLCopyFileSystemPath(?mainBundleURL,?kCFURLPOSIXPathStyle);??? ?????assert(cfStringRef);??? ??? ?????CFStringGetCString(cfStringRef,?path,?1024,?kCFStringEncodingASCII);??? ??? ?????CFRelease(mainBundleURL);??? ?????CFRelease(cfStringRef);??? ??? ?????return?std::string(path);??? ?}??? ?#endif??? ??? ?using?namespace?Ogre;??? ??? ????? ?class?ExampleApplication??? ?{??? ?public:??? ?????ExampleApplication()??? ?????{??? ?????????mFrameListener?=?0;??? ?????????mRoot?=?0;??? ?#if?OGRE_PLATFORM?==?OGRE_PLATFORM_APPLE??? ?????????mResourcePath?=?macBundlePath()?+?"/Contents/Resources/";??? ?#else??? ?????????mResourcePath?=?"";??? ?#endif??? ?????}??? ??????????virtual?~ExampleApplication()??? ?????{??? ?????????if?(mFrameListener)??? ?????????????delete?mFrameListener;??? ?????????if?(mRoot)??? ?????????????OGRE_DELETE?mRoot;??? ?????}??? ??? ??????????virtual?void?go(void)??? ?????{??? ??????????????????if?(!setup())??? ?????????????return;??? ??????????????????mRoot->startRendering();??? ??????????????????destroyScene();??? ?????}??? ??? ?protected:??? ??????????Root?*mRoot;??? ??????????Camera*?mCamera;??? ??????????SceneManager*?mSceneMgr;??? ??????????ExampleFrameListener*?mFrameListener;??? ??????????RenderWindow*?mWindow;??? ??????????Ogre::String?mResourcePath;??? ??????????virtual?bool?setup(void)??? ?????{??? ?????????String?pluginsPath;??? ?#ifndef?OGRE_STATIC_LIB??? ?????????pluginsPath?=?mResourcePath?+?"plugins.cfg";??? ?#endif??? ??????????????????mRoot?=?OGRE_NEW?Root(pluginsPath,???? ?????????????mResourcePath?+?"ogre.cfg",?mResourcePath?+?"Ogre.log");??? ??????????????????setupResources();??? ??????????????????bool?carryOn?=?configure();??? ?????????if?(!carryOn)?return?false;??? ??????????????????chooseSceneManager();??? ??????????????????createCamera();??? ??????????????????createViewports();??? ???????????? ?????????TextureManager::getSingleton().setDefaultNumMipmaps(5);??? ??????????????????createResourceListener();??? ??????????????????loadResources();??? ??????????????????createScene();??? ??????????????????createFrameListener();??? ?????????return?true;??? ?????}??? ??????? ?????virtual?bool?configure(void)??? ?????{??? ??????????????????if(mRoot->showConfigDialog())??? ?????????{??? ??????????????????????????mWindow?=?mRoot->initialise(true);??? ?????????????return?true;??? ?????????}??? ?????????else?? ?????????{??? ?????????????return?false;??? ?????????}??? ?????}??? ??? ?????virtual?void?chooseSceneManager(void)??? ?????{??? ??????????????????mSceneMgr?=?mRoot->createSceneManager(ST_GENERIC,?"ExampleSMInstance");??? ?????}??? ?????virtual?void?createCamera(void)??? ?????{??? ??????????????????mCamera?=?mSceneMgr->createCamera("PlayerCam");??? ??? ??????????????????mCamera->setPosition(Vector3(0,0,500));??? ??????????????????mCamera->lookAt(Vector3(0,0,-300));??? ??????????????????mCamera->setNearClipDistance(5);??? ???????????????????????}??? ??????????virtual?void?createFrameListener(void)??? ?????{??? ??????????????????mFrameListener=?new?ExampleFrameListener(mWindow,?mCamera);??? ??????????????????mFrameListener->showDebugOverlay(true);??? ??????????????????mRoot->addFrameListener(mFrameListener);??? ?????}??? ??????????virtual?void?createScene(void)?=?0;???? ??????????virtual?void?destroyScene(void){}??? ??????? ?????virtual?void?createViewports(void)??? ?????{??? ??????????????????Viewport*?vp?=?mWindow->addViewport(mCamera);??? ??????????????????vp->setBackgroundColour(ColourValue(0,0,0));??? ??? ??????????????????mCamera->setAspectRatio(Real(vp->getActualWidth())?/?Real(vp->getActualHeight()));??? ?????}??? ??? ??????????virtual?void?setupResources(void)??? ?????{??? ?????????ConfigFile?cf;??? ??????????????????cf.load(mResourcePath?+?"resources.cfg");??? ?????????ConfigFile::SectionIterator?seci?=?cf.getSectionIterator();??? ?????????String?secName,?typeName,?archName;??? ?????????while?(seci.hasMoreElements())??? ?????????{??? ?????????????secName?=?seci.peekNextKey();??? ?????????????ConfigFile::SettingsMultiMap?*settings?=?seci.getNext();??? ?????????????ConfigFile::SettingsMultiMap::iterator?i;??? ?????????????for?(i?=?settings->begin();?i?!=?settings->end();?++i)??? ?????????????{??? ??????????????????????????????????typeName?=?i->first;??? ?????????????????archName?=?i->second;??? ?#if?OGRE_PLATFORM?==?OGRE_PLATFORM_APPLE??? ?????????????????ResourceGroupManager::getSingleton().addResourceLocation(??? ?????????????????????String(macBundlePath()?+?"/"?+?archName),?typeName,?secName);??? ?#else??? ?????????????????ResourceGroupManager::getSingleton().addResourceLocation(??? ?????????????????????archName,?typeName,?secName);??? ?#endif??? ?????????????}??? ?????????}??? ?????}??? ??? ??????????virtual?void?createResourceListener(void)??? ?????{??? ?????}??? ??? ??????????virtual?void?loadResources(void)??? ?????{??? ?????????ResourceGroupManager::getSingleton().initialiseAllResourceGroups();??? ?????}??? ?};??? ??? ??? ?#endif?? ExampleFrameListener.h
#ifndef?__ExampleFrameListener_H__??? ?#define?__ExampleFrameListener_H__??? ??? ?#include?"Ogre.h"??? ?#include?"OgreStringConverter.h"??? ?#include?"OgreException.h"??? ?#define?OIS_DYNAMIC_LIB??? ?#include?<OIS/OIS.h>??? ??? ?using?namespace?Ogre;??? ??? ?class?ExampleFrameListener:?public?FrameListener,?public?WindowEventListener??? ?{??? ?protected:??? ?????virtual?void?updateStats(void)??? ?????{??? ?????????static?String?currFps?=?"Current?FPS:?";??? ?????????static?String?avgFps?=?"Average?FPS:?";??? ?????????static?String?bestFps?=?"Best?FPS:?";??? ?????????static?String?worstFps?=?"Worst?FPS:?";??? ?????????static?String?tris?=?"Triangle?Count:?";??? ?????????static?String?batches?=?"Batch?Count:?";??? ??? ??????????????????try?{??? ?????????????OverlayElement*?guiAvg?=?OverlayManager::getSingleton().getOverlayElement("Core/AverageFps");??? ?????????????OverlayElement*?guiCurr?=?OverlayManager::getSingleton().getOverlayElement("Core/CurrFps");??? ?????????????OverlayElement*?guiBest?=?OverlayManager::getSingleton().getOverlayElement("Core/BestFps");??? ?????????????OverlayElement*?guiWorst?=?OverlayManager::getSingleton().getOverlayElement("Core/WorstFps");??? ??? ?????????????const?RenderTarget::FrameStats&?stats?=?mWindow->getStatistics();??? ?????????????guiAvg->setCaption(avgFps?+?StringConverter::toString(stats.avgFPS));??? ?????????????guiCurr->setCaption(currFps?+?StringConverter::toString(stats.lastFPS));??? ?????????????guiBest->setCaption(bestFps?+?StringConverter::toString(stats.bestFPS)??? ?????????????????+"?"+StringConverter::toString(stats.bestFrameTime)+"?ms");??? ?????????????guiWorst->setCaption(worstFps?+?StringConverter::toString(stats.worstFPS)??? ?????????????????+"?"+StringConverter::toString(stats.worstFrameTime)+"?ms");??? ??? ?????????????OverlayElement*?guiTris?=?OverlayManager::getSingleton().getOverlayElement("Core/NumTris");??? ?????????????guiTris->setCaption(tris?+?StringConverter::toString(stats.triangleCount));??? ??? ?????????????OverlayElement*?guiBatches?=?OverlayManager::getSingleton().getOverlayElement("Core/NumBatches");??? ?????????????guiBatches->setCaption(batches?+?StringConverter::toString(stats.batchCount));??? ??? ?????????????OverlayElement*?guiDbg?=?OverlayManager::getSingleton().getOverlayElement("Core/DebugText");??? ?????????????guiDbg->setCaption(mDebugText);??? ?????????}??? ?????????catch(...)?{??}??? ?????}??? ??? ?public:??? ??????????ExampleFrameListener(RenderWindow*?win,?Camera*?cam,?bool?bufferedKeys?=?false,?bool?bufferedMouse?=?false,??? ??????????????????bool?bufferedJoy?=?false?)?:??? ?????????mCamera(cam),?mTranslateVector(Vector3::ZERO),?mCurrentSpeed(0),?mWindow(win),?mStatsOn(true),?mNumScreenShots(0),??? ?????????mMoveScale(0.0f),?mRotScale(0.0f),?mTimeUntilNextToggle(0),?mFiltering(TFO_BILINEAR),??? ?????????mAniso(1),?mSceneDetailIndex(0),?mMoveSpeed(100),?mRotateSpeed(36),?mDebugOverlay(0),??? ?????????mInputManager(0),?mMouse(0),?mKeyboard(0),?mJoy(0)??? ?????{??? ??????????????????mDebugOverlay?=?OverlayManager::getSingleton().getByName("Core/DebugOverlay");??? ??????????????????LogManager::getSingletonPtr()->logMessage("***?Initializing?OIS?***");??? ?????????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?);??? ??? ??????????????????mKeyboard?=?static_cast<OIS::Keyboard*>(mInputManager->createInputObject(?OIS::OISKeyboard,?bufferedKeys?));??? ?????????mMouse?=?static_cast<OIS::Mouse*>(mInputManager->createInputObject(?OIS::OISMouse,?bufferedMouse?));??? ?????????try?{??? ?????????????mJoy?=?static_cast<OIS::JoyStick*>(mInputManager->createInputObject(?OIS::OISJoyStick,?bufferedJoy?));??? ?????????}??? ?????????catch(...)?{??? ?????????????mJoy?=?0;??? ?????????}??? ??? ??????????????????windowResized(mWindow);??? ??????????????????showDebugOverlay(true);??? ??? ??????????????????WindowEventUtilities::addWindowEventListener(mWindow,?this);??? ?????}??? ??? ??????????virtual?void?windowResized(RenderWindow*?rw)??? ?????{??? ?????????unsigned?int?width,?height,?depth;??? ?????????int?left,?top;??? ??????????????????rw->getMetrics(width,?height,?depth,?left,?top);??? ??????????????????const?OIS::MouseState?&ms?=?mMouse->getMouseState();??? ?????????ms.width?=?width;??? ?????????ms.height?=?height;??? ?????}??? ??? ??????????virtual?void?windowClosed(RenderWindow*?rw)??? ?????{??? ??????????????????if(?rw?==?mWindow?)??? ?????????{??? ?????????????if(?mInputManager?)??? ?????????????{??? ??????????????????????????????????mInputManager->destroyInputObject(?mMouse?);??? ?????????????????mInputManager->destroyInputObject(?mKeyboard?);??? ?????????????????mInputManager->destroyInputObject(?mJoy?);??? ??????????????????????????????????OIS::InputManager::destroyInputSystem(mInputManager);??? ?????????????????mInputManager?=?0;??? ?????????????}??? ?????????}??? ?????}??? ??? ?????virtual?~ExampleFrameListener()??? ?????{??? ??????????????????WindowEventUtilities::removeWindowEventListener(mWindow,?this);??? ??????????????????windowClosed(mWindow);??? ?????}??? ??????????virtual?bool?processUnbufferedKeyInput(const?FrameEvent&?evt)??? ?????{??? ??? ?????????if(mKeyboard->isKeyDown(OIS::KC_A))??? ?????????????mTranslateVector.x?=?-mMoveScale;?????? ?????????if(mKeyboard->isKeyDown(OIS::KC_D))??? ?????????????mTranslateVector.x?=?mMoveScale;??????? ?????????if(mKeyboard->isKeyDown(OIS::KC_UP)?||?mKeyboard->isKeyDown(OIS::KC_W)?)??? ?????????????mTranslateVector.z?=?-mMoveScale;?????? ?????????if(mKeyboard->isKeyDown(OIS::KC_DOWN)?||?mKeyboard->isKeyDown(OIS::KC_S)?)??? ?????????????mTranslateVector.z?=?mMoveScale;??????? ?????????if(mKeyboard->isKeyDown(OIS::KC_PGUP))??? ?????????????mTranslateVector.y?=?mMoveScale;??????? ?????????if(mKeyboard->isKeyDown(OIS::KC_PGDOWN))??? ?????????????mTranslateVector.y?=?-mMoveScale;?????? ?????????if(mKeyboard->isKeyDown(OIS::KC_RIGHT))??? ?????????????mCamera->yaw(-mRotScale);??? ??? ?????????if(mKeyboard->isKeyDown(OIS::KC_LEFT))??? ?????????????mCamera->yaw(mRotScale);??? ??? ?????????if(?mKeyboard->isKeyDown(OIS::KC_ESCAPE)?||?mKeyboard->isKeyDown(OIS::KC_Q)?)??? ?????????????return?false;??? ??? ?????????if(?mKeyboard->isKeyDown(OIS::KC_F)?&&?mTimeUntilNextToggle?<=?0?)??? ?????????{??? ?????????????mStatsOn?=?!mStatsOn;??? ?????????????showDebugOverlay(mStatsOn);??? ?????????????mTimeUntilNextToggle?=?1;??? ?????????}??? ??? ?????????if(?mKeyboard->isKeyDown(OIS::KC_T)?&&?mTimeUntilNextToggle?<=?0?)??? ?????????{??? ?????????????switch(mFiltering)??? ?????????????{??? ?????????????case?TFO_BILINEAR:??? ?????????????????mFiltering?=?TFO_TRILINEAR;??? ?????????????????mAniso?=?1;??? ?????????????????break;??? ?????????????case?TFO_TRILINEAR:??? ?????????????????mFiltering?=?TFO_ANISOTROPIC;??? ?????????????????mAniso?=?8;??? ?????????????????break;??? ?????????????case?TFO_ANISOTROPIC:??? ?????????????????mFiltering?=?TFO_BILINEAR;??? ?????????????????mAniso?=?1;??? ?????????????????break;??? ?????????????default:?break;??? ?????????????}??? ?????????????MaterialManager::getSingleton().setDefaultTextureFiltering(mFiltering);??? ?????????????MaterialManager::getSingleton().setDefaultAnisotropy(mAniso);??? ??? ?????????????showDebugOverlay(mStatsOn);??? ?????????????mTimeUntilNextToggle?=?1;??? ?????????}??? ??? ?????????if(mKeyboard->isKeyDown(OIS::KC_SYSRQ)?&&?mTimeUntilNextToggle?<=?0)??? ?????????{??? ?????????????std::ostringstream?ss;??? ?????????????ss?<<?"screenshot_"?<<?++mNumScreenShots?<<?".png";??? ?????????????mWindow->writeContentsToFile(ss.str());??? ?????????????mTimeUntilNextToggle?=?0.5;??? ?????????????mDebugText?=?"Saved:?"?+?ss.str();??? ?????????}??? ??? ?????????if(mKeyboard->isKeyDown(OIS::KC_R)?&&?mTimeUntilNextToggle?<=0)??? ?????????{??? ?????????????mSceneDetailIndex?=?(mSceneDetailIndex+1)%3?;??? ?????????????switch(mSceneDetailIndex)?{??? ?????????????????case?0?:?mCamera->setPolygonMode(PM_SOLID);?break;?????????????????case?1?:?mCamera->setPolygonMode(PM_WIREFRAME);?break;??? ?????????????????case?2?:?mCamera->setPolygonMode(PM_POINTS);?break;??? ?????????????}??? ?????????????mTimeUntilNextToggle?=?0.5;??? ?????????}??? ??? ?????????static?bool?displayCameraDetails?=?false;??? ?????????if(mKeyboard->isKeyDown(OIS::KC_P)?&&?mTimeUntilNextToggle?<=?0)??? ?????????{??? ?????????????displayCameraDetails?=?!displayCameraDetails;??? ?????????????mTimeUntilNextToggle?=?0.5;??? ?????????????if?(!displayCameraDetails)??? ?????????????????mDebugText?=?"";??? ?????????}??? ??? ?????????if(displayCameraDetails)??? ?????????????mDebugText?=?"P:?"?+?StringConverter::toString(mCamera->getDerivedPosition())?+??? ??????????????????????????"?"?+?"O:?"?+?StringConverter::toString(mCamera->getDerivedOrientation());??? ?????????return?true;??? ?????}??? ??????????virtual?bool?processUnbufferedMouseInput(const?FrameEvent&?evt)??? ?????{??? ??? ???????????????????????????const?OIS::MouseState?&ms?=?mMouse->getMouseState();??? ?????????if(?ms.buttonDown(?OIS::MB_Right?)?)??? ?????????{??? ?????????????mTranslateVector.x?+=?ms.X.rel?*?0.13;??? ?????????????mTranslateVector.y?-=?ms.Y.rel?*?0.13;??? ?????????}??? ?????????else?? ?????????{??? ?????????????mRotX?=?Degree(-ms.X.rel?*?0.13);??? ?????????????mRotY?=?Degree(-ms.Y.rel?*?0.13);??? ?????????}??? ??? ?????????return?true;??? ?????}??? ??? ??????????virtual?void?moveCamera()??? ?????{??? ??????????????????mCamera->yaw(mRotX);??? ??????????????????mCamera->pitch(mRotY);??? ??????????????????mCamera->moveRelative(mTranslateVector);??? ?????}??? ??????????virtual?void?showDebugOverlay(bool?show)??? ?????{??? ?????????if?(mDebugOverlay)??? ?????????{??? ?????????????if?(show)??? ?????????????????mDebugOverlay->show();??? ?????????????else?? ?????????????????mDebugOverlay->hide();??? ?????????}??? ?????}??? ??? ??????????bool?frameRenderingQueued(const?FrameEvent&?evt)??? ?????{??? ??? ?????????if(mWindow->isClosed())??return?false;??? ??? ?????????mSpeedLimit?=?mMoveScale?*?evt.timeSinceLastFrame;??? ??? ??????????????????mKeyboard->capture();??? ?????????mMouse->capture();??? ?????????if(?mJoy?)?mJoy->capture();??? ??? ?????????bool?buffJ?=?(mJoy)???mJoy->buffered()?:?true;??? ??? ?????????Ogre::Vector3?lastMotion?=?mTranslateVector;??? ?????????if(?!mMouse->buffered()?||?!mKeyboard->buffered()?||?!buffJ?)??? ?????????{??? ??????????????????????????if?(mTimeUntilNextToggle?>=?0)??? ?????????????????mTimeUntilNextToggle?-=?evt.timeSinceLastFrame;??? ??? ??????????????????????????mMoveScale?=?mMoveSpeed?*?evt.timeSinceLastFrame;??? ??????????????????????????mRotScale?=?mRotateSpeed?*?evt.timeSinceLastFrame;??? ??? ?????????????mRotX?=?0;??? ?????????????mRotY?=?0;??? ?????????????mTranslateVector?=?Ogre::Vector3::ZERO;??? ??? ?????????}??? ??? ??????????????????if(?!mKeyboard->buffered()?)??? ?????????????if(?processUnbufferedKeyInput(evt)?==?false?)??? ?????????????????return?false;??? ?????????if(?!mMouse->buffered()?)??? ?????????????if(?processUnbufferedMouseInput(evt)?==?false?)??? ?????????????????return?false;??? ??? ??????????????????if?(mTranslateVector?==?Ogre::Vector3::ZERO)??? ?????????{??? ??????????????????????????mCurrentSpeed?-=?evt.timeSinceLastFrame?*?0.3;??? ?????????????mTranslateVector?=?lastMotion;??? ?????????}??? ?????????else?? ?????????{??? ??????????????????????????mCurrentSpeed?+=?evt.timeSinceLastFrame;??? ??? ?????????}??? ??????????????????if?(mCurrentSpeed?>?1.0)??? ?????????????mCurrentSpeed?=?1.0;??? ?????????if?(mCurrentSpeed?<?0.0)??? ?????????????mCurrentSpeed?=?0.0;??? ??? ?????????mTranslateVector?*=?mCurrentSpeed;??? ??? ??? ?????????if(?!mMouse->buffered()?||?!mKeyboard->buffered()?||?!buffJ?)??? ?????????????moveCamera();??? ??? ?????????return?true;??? ?????}??? ??? ??????????bool?frameEnded(const?FrameEvent&?evt)??? ?????{??? ?????????updateStats();??? ?????????return?true;??? ?????}??? ??? ?protected:??? ??????????Camera*?mCamera;??? ??????????Vector3?mTranslateVector;??? ?????Real?mCurrentSpeed;??? ??????????RenderWindow*?mWindow;??? ??????????bool?mStatsOn;??? ??????????std::string?mDebugText;??? ??????????unsigned?int?mNumScreenShots;??? ??????????float?mMoveScale;??? ??????????float?mSpeedLimit;??? ??????????Degree?mRotScale;??? ??????????Real?mTimeUntilNextToggle?;??? ??????????Radian?mRotX,?mRotY;??? ??????????TextureFilterOptions?mFiltering;??? ?????int?mAniso;??? ?????int?mSceneDetailIndex?;??? ??????????Real?mMoveSpeed;??? ??????????Degree?mRotateSpeed;??? ??????????Overlay*?mDebugOverlay;??? ??? ??????????OIS::InputManager*?mInputManager;??? ??????????OIS::Mouse*????mMouse;??? ??????????OIS::Keyboard*?mKeyboard;??? ??????????OIS::JoyStick*?mJoy;??? ?};??? ??? ?#endif?? 接續(xù)(二)
轉(zhuǎn)載于:https://blog.51cto.com/yarin/382498
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎
總結(jié)
以上是生活随笔為你收集整理的ogre研究之第一个程序(一)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。