ogre在Linux下如何创建窗口,linux+ogre环境搭建

主要参考http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Home中的系列文章。

安装平台:

Ubuntu12.04

cmake version 2.8.7

gcc (Ubuntu/Linaro 4.7.3-2ubuntu1~12.04) 4.7.3

ogre_src_v1-9-0RC1.tar.bz2

我采用的是从源码编译方式来创建OGRE。

一、安装一些依赖包。

在ubuntu下执行下列命令(参考文章http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Prerequisites&tikiversion=Linux):

For Ubuntu Karmic and above:

Compiler And Configuration Tools

sudo apt-get install build-essential automake libtool

Required Dependencies

sudo apt-get install libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev

If during Ogre build any headers are still missing, try adding these one at a time, and update the list above please!

bf9b446bd26f6dbd987043b4959ed972.png

libxt-dev

libpng3-dev

Could probably use

libglew1.5-dev

instead of

freeglut3-dev

. It is an open question whether or not

libxt-dev

and

libpng3-dev

is required.

Not Strictly Required Dependencies

sudo apt-get install nvidia-cg-toolkit libois-dev libboost-thread-dev

9ea825c3223a05749c947f816fb33c8b.png

While

nvidia-cg-toolkit

,

libois-dev

and

libboost-thread-dev

are not strictly required, you'll want to install them:

nvidia-cg-toolkit is used by the Cg plugin for Cg shaders.

libois-dev is used as input library for the demos.

libboost-thread-dev is used by the paging component and other background threading.

Entirely Optional Dependencies

sudo apt-get install doxygen graphviz libcppunit-dev

二、编译下载的OGRE源码

执行下列命令(参考文章http://www.ogre3d.org/tikiwiki/tiki-index.php?page=CMake+Quick+Start+Guide&tikiversion=Linux):

Download Ogre Source

f5a57a1027d95c406f9de29c79b89e37.png (Instructions below assume current version of 1.8.0, update as needed)

Decompress:

tar xjf ogre_src_v1-8-0.tar.bz2

Move to source directory:

cd ogre_src_v1-8-0

Create build directory:

mkdir build

Move into build directory:

cd build

Trigger cmake, passing path to Ogre source directory:

cmake .. See the Extensive CMake page for a list of compilation options which can be passed to CMake at this stage, and Getting Started With CMake for even more background material. N.B. Please note that OGRE_CONFIG_THREADS = 1 is not supported on Linux.

If the CMake results look good, build Ogre:

make -j2 The -j2 specifies how many parallel compilation jobs to run. Substitute the number of processor cores on your system, e.g. -j2 for a dual-core, -j4 for a quad core...

Once compilation is successful, you can install into the system (by default, /usr/local):

sudo make install 三、测试

参考文章Building Your Projects With CMake(http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Building+Your+Projects+With+CMake):

详细的就不说了,一步步按照文章说明来做即可。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值