Search This Blog

Subscribe to this blog

Follow by Email

How to install OGRE SDK from source

In this article we will present you how to install OGRE SDK, that so how to compile it from source. Even though we are aware that compiling is not recommended in Ubuntu, in this particular program is vital to do so. However, before we continue to the installation instructions, you need to know what OGRE is.

[toggle title="What's OGRE"]

What is OGRE?

OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce applications utilising hardware-accelerated 3D graphics. The class library abstracts all the details of using the underlying system libraries like Direct3D and OpenGL and provides an interface based on world objects and other intuitive classes.

What can it do?

Lots of things! See the features page for an up-to-date list of the current features. Also, take a look at the screenshots page to see for yourself the kinds of eye candy OGRE can pump out.

Is OGRE a Game Engine?

No. OGRE can be (and indeed has been) used to make games, but OGRE is deliberately designed to provide just a world-class graphics solution; for other features like sound, networking, AI, collision, physics etc, you will need to integrate it with other libraries, something several frameworks have done, and we have a collision / physics reference integration library as an example in our distribution.

2. Download OGRE SDK Source

First off you need to understand what version you would like to install. Personally, as being a beginner to OGRE I recommend you to install the stable branch. Here's a brief explanation of what there is available to the public.

[tabs tab1="Development branch" tab2="Maintenance branch" ]

[tab]Development (default) branch: this is the latest development version where all the new features are being added. This is fine if you want to see the very latest features, but it is inherently the least stable version, and there may be interface-breaking changes going on here. Only use the trunk if you are confident in your ability to handle the odd problem.[/tab]

[tab]Maintenance branches: these are branches where the API is stable within a major version. Only bugfixes are applied to these branches, and no interface-breaking changes. Only one maintenance branch is actively maintained, representing the current stable version, but others may be present from previous stables. The maintenance branches are named after the stable major version, such as ‘v1-6′ or ‘v1-7′. The latest of these is the best branch to use if you want to keep up with the latest fixes, but need a stable development platform.[/tab]

[/tabs]

Click on the button bellow to download OGRE's Mainteance stable version from SourceForge.

3. Compile OGRE SDK

Once you have extracted OGRE into /home dir, then go in that folder in terminal way. Pay attention that in the following example, I have downloaded OGRE 1.8.1 version, thus the name scheme applying is ogre_src_v1-8-1.

[tab]Code blocks is a well-known IDE for programming. If you want to build OGRE through Code::Blocks then setup your cmake parameters properly.

cmake -G "CodeBlocks - Unix Makefiles" ..

More information about Building project with Codeblocks can be found here.

[/tab]

[tab]Kdevelop4 is very nice, easy-to-use and modern IDE. After getting source, just open Kdevelop and click "Project -> Open/Import Project..." and show path to code (~/ogre_src_v1-8-1). You will have to choose build folder (eg /home/drpaneas/ogre_src_v1-8-1/build). Then wait a little bit for KDevelop to load and index the project files.

For building click on button "Build Selection". For running click "Execute". Running first time "Launch Configurations" will pop up. You have to set executable file by selecting "ogre_src_v1-8-1", clicking "+" icon and choosing under (Launch Configuration) Executable "/home/drpaneas/ogre_src_v1-8-1/build/bin/SampleBrowser_d" as "Project Target".Then Run it (Shift+F9).

That's it. Now you are able to launch the SampleBrowser, located at /Build/bin/ directory at your OGRE project.

When you launch SampleBrowser for the very first time, it asks you to choose your Renderer. Being in Linux and native in Ubuntu, you have no choice but select OpenGL Rendering Subsystem; then click Accept.

This is the menu of SampleBrowser. In there you can configure your settings and test any sample project that comes with OGRE SDK by default. Also, bare in mind that you are able to see the source code of any of these samples.

It's throwing me a bunch of warnings while 'making'... do i have to worry about it? I've already installed all necessary things before compiling but i'm a bit scared. It's also taking a while... hope it's not a problem. Thanks for the guide!

Using multiple cores and processors simultaneously to achieve faster compression and decompression rates is possible nowadays with the new generation of multi-core cpu's. Using the following methods to create compressed backups of your files will be less time consuming.