OGRE 构建CEGUI

30 篇文章 1 订阅

概述

Ogre 1.7 版本开始,Ogre中开始采用自己的接口来处理Sample中的演示程序,而不再依赖CEGUI界面库。

这意味着从现在开始,如果你需要使用最新版本的Ogre和CEGUI的话,你需要在自己的工程中构建CEGUI。你可以到这里下载Ogre 以及 下载CEGUI

Step-by-step guide

  • 1. Get the appropriate CEGUI SDK version from the CEGUI download page or get the very latest CEGUI version from the SVN repository.
  • 2. Also get the latest Ogre version. Without regards whether you got it from repository or you are just compiling it yourself, you will need to build it first to get the .lib and .dll files.
  • 3. In your CEGUI folder there should be a folder called "projects" with a subfolder called "premake". Get a version of premake and extract the premake.exe file into this folder.
  • 4. Open config.lua in the premake folder and edit the Ogre and OIS paths accordingly, so they will point to your SDK files. In my case for example the 2 lines look like this:
OGRE_PATHS = { ".../Visual Studio 2008/Projects/Ogre 1.7/Ogre/VCBuild/sdk", "include/OGRE", "lib" }
OIS_PATHS = { ".../Visual Studio 2008/Projects/Ogre 1.7/Ogre/VCBuild/sdk", "include/OIS", "lib" }

Note: Remember to use forward slashes here! Just copying the paths from the Windows explorer will give you backward slashes. Replace them!

Next, set all Renderers you do not need to "false", in this case we will only need OGRE_RENDERER. You can also set all samples to false, except maybe SAMPLES_OGRE if you want them.

  • 5. Next, we create our Visual Studio Projects - Execute build_vs2008.bat to create a Visual Studio 2008 project or execute any other .bat file for your respective Visual Studio version.
  • 6. This should create CEGUI.sln in the premake folder. Open it.
  • 7. If you have the Ogre lib files seperated into a Debug and Release folder, you will have to change the path in the Linker settings of the project so they will point to the lib/Debug or lib/Release folder for each configuration respectively.
  • 8. Build the CEGUIOgreRenderer in Debug and Release mode, copy the CEGUIBase and CEGUIOgreRenderer .dll and .lib files as well as the CEGUI include folder and there you go, you're done!

Questions

For any suggestions and questions send a PM to me (Ident) or just ask in the forums and someone else will help you for sure... When you need help building Ogre, I fully recommend reading this short guide.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值