OGRE (Object-Oriented Graphics Rendering Engine)
Building OGRE
Building and Installing OGRE
This release of OGRE builds under the following configurations:
Platform |
Compiler |
Extra Notes |
Microsoft
Visual C++ 6 SP3+ |
Requires
DirectX 9.0 SDK. Note that the last version of the DirectX 9 SDK
supported for VC6 is the Summer 2004 version. |
|
gcc (GNU Compiler Collection) |
Requires gcc 3.x |
|
gcc (GNU Compiler Collection) |
Requires gcc 3.x |
Building with Visual C++ 6 or Visual C++.Net
If you're building with Visual C++, follow these steps:
Make sure you have downloaded and installed STLport, version 4.6.2 if you are not using .Net 2003. The instructions for building and installing STLport are in the FAQ
Download and install the DirectX9 SDK, get the latest if you're using VC7+, the Summer 2004 version plus the 'Extras' if using VC6.
Download and extract the latest 3rd party libraries distribution (you can find this in the downloads section of the OGRE hompage). See the FAQ for more details.
Open either Ogre.dsw (VC6) or Ogre.sln (VC7+)
Check the ordering of your include and library paths (in Tools | Options). The ordering should be STLport (if applicable), DirectX, then everything else.
Perform a Batch Build for all the projects. The dependencies should ensure everything is built in the right order.
If you're building under Linux with gcc, here's a very quick overview:
If you're using gcc version 2.9x, make sure you've installed STLport. However, if you can we advise using gcc 3.2+.
Confirm that you have SDL 1.2.4, Freetype2, DevIL, zziplib, CEGUI 0.2.0 and pkg-config available on your system (if not, install them!)
Change to the 'ogrenew' directory,
If you are installing from CVS, run './bootstrap'
type './configure'.
Run 'make' and 'make install' (the latter as root)
For more detailed instructions, see the Linux README.
Please read the Mac README.
Explanation of the Core libraries
OGRE compiles into a number of shared dynamically-linked libraries for use by OGRE applications. It also has a number of optional plugin libraries, which are used to provide rendering system implementations (e.g. an interface to DirectX) and special features (e.g. a BSP-oriented scene manager). Plugins are configured using the 'plugins.cfg' file located in the same folder as your application. Here's an example:
-----snip------------------------------------------------------
PluginFolder=plugins\
# Define particle system plugin
Plugin=Plugin_ParticleFX
-----snip------------------------------------------------------
This simple plugins.cfg tells Ogre to load all plugins from the 'plugins' folder directly under the application's folder, and to load Plugin_ParticleFX (.dll in Windows, .so in Linux), the particle system implementation.
The best way to get started with OGRE is to look at the example applications which are included. These should make it clear to you how easy it is to get an OGRE application running in a surprisingly small amount of code!
Libraries in detail
The libraries are:
OgreMain |
The core dll which includes all the basic classes, and abstractions of all the engine components which will be refined per OS platform, rendering API, or per scene type. This library must be on the path or in the current folder to be loaded at startup. The source for this is completely cross-platform. |
OgrePlatform |
This library implements concrete versions of the classes required to be implemented for each platform. There are currently implementations for Win32 and Linux platforms. This library is loaded dynamically by the PlatformManager class (in OgreMain) and must either be on the path or in the current folder. |
RenderSystem_Direct3D7/9 |
Plugin library which adds a RenderSystem implementation for Direct3D. This library is loaded dynamically by the plugin architecture described above, and must be located in the folder specified in plugins.cfg. You may use any of these render systems on Windows, but the more recent version support extra features. |
RenderSystem_GL |
Implementation of the RenderSystem which is based on OpenGL. Used for the Linux & Mac platforms primarily but can be used in Windows too. |
Plugin_BspSceneManager |
Plugin specialisation of the general-purpose SceneManager for rendering indoor levels based on a BSP tree. Allows Quake3 maps to be loaded and rendered very efficiently whilst exposing none of the complexity to the core Ogre system. This library is loaded dynamically by the plugin architecture described above, and must be located in the folder specified in plugins.cfg. |
Plugin_ParticleFX |
Plugin which provides a range of particle system tools such as standard emitters and affectors. |
Plugin_OctreeSceneManager |
Plugin which provides scene management based on an octree system. |
ReferenceAppLayer |
This is a utility library which is a client of the OgreMain library, and can be used by your application to add additional non-graphics related features to your application. It is designed to be an example of how you might tie together other libraries with OGRE in order to build a larger system; in this case we implement collision and physics using ODE. |
There are also several other plugins, tools and demos which are built as part of the standard batch build process.
More tips and information can be obtained from the OGRE Wiki.
Copyright © 2005 by The OGRE Team