Installing Ogre 3D in PCLinux


This article outlines how to get Ogre 3D installed and running on PCLinux OS. The Ogre  describe it as 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."

NOTE: This is how the installation worked for my system, but people with different configurations of PCLinux may find that his doesn't work. This article is intended to help others who may have difficulty installing Ogre; it is not meant to be the ultimate installation guide. The installation was done circa 01-August-06.

Most of the required dependencies can be install from the PCLinux repositories using the excellent Synaptic package management tool. As I have an NVidia FX 5200 graphics card I will concentrate on installing NVidia drivers. Folks with ATI cards need to install their appropriate drivers. The packages needed for to be able to use Ogre are listed below and should be installed in this order:

Package Version Install From:
Automake 1.8.5 Synaptic
Autoconf 1:2.59 Synaptic
make 1:3.80 Synaptic
libtool 1.5.18 Synaptic
pkgconfig 0.20 Synaptic
GCC 3.3.1 Synaptic
gcc-c++ 3.3.1 Synaptic
gcc-cpp 3.3.1 Synaptic
libSDL1.2 1.2.7 Synaptic
libSDL1.2-devel 1.2.7 Synaptic
libSDL_Mixer1.2 1.2.5 Synaptic
libSDL_Mixer1.2-devel 1.2.5 Synaptic
Mesa 2:5.0.2 Synaptic
freetype 1.3.1 Synaptic
freetype-devel 1.3.1 Synaptic
libpng 2:1.2.8 Synaptic
libpng-devel 2:1.2.8 Synaptic
libmng1 1.0.5 Synaptic
libmng1-devel 1.0.5 Synaptic
libtiff3 3.6.1 Synaptic
libtiff3-devel 3.6.1 Synaptic
libjpeg62 6b-32mdk Synaptic
libjpeg62-devel 6b-32mdk Synaptic
zziplib0 0.13.33 Synaptic
zziplib0-devel 0.13.33 Synaptic
NVidia drivers 1.0-8178 http://www.nvidia.com/object/unix.html
Cg 1.4.1 http://developer.nvidia.com/page/cg_main.html
DevIL 1.6.8 http://openil.sourceforge.net/
CEGui 0.4.1 http://www.cegui.org.uk
Ogre 3D 1.2.0 http://www.ogre3d.org/


For all of the packages that can be installed via Synaptic, installation is as simple as searching for the packages, right click on its icon and select 'Mark for Installation'. Click the Apply button on the toolbar.

The five packages at the bottom of the list need to be installed from source code as packages for PCLinux do not exist. Follow the instructions below for how to do this.

Installing NVidia Drivers.

You will need to have the kernel source code installed to install NVidia drivers. It should be on the system be default. If not, you can get it through Synaptic (make sure you get the version that matches your kernel version!)
  1. Open a terminal (my favourite is Yakuake, but I also like Konsole!)
  2. Switch to the root user by typing su -
  3. Enter the root password when prompted
  4. Switch to non-graphical mode by typing telinit 3
  5. Login as root if necessary and navigate to the directory containing the NVidia driver file. (use cd <dir name> to navigate the filesystem.)
  6. The NVidia driver file will be named something like NVIDIA-Linux-x86-1.0-8178-pkg1.run
  7. To execute the file, type ./NVIDIA-Linux-x86-1.0-8178-pkg1.run
  8. Say Yes/Accept to all question. The installer should compile the graphics driver module and install it.
  9. When finished, type telinit 5 to return to graphical mode. You should notice an NVidia splash screen during the X server startup.
  10. Test out the new driver by opening a terminal and typing glxgears
  11. A window will open displaying three spinning gear cogs. The maximum number of frames-per-second will be outputted in the terminal. Anything below 1000 fps will get it hard to work with Ogre. My card (FX 5200) displays on average 3000 fps. Some of the latest graphics cards can reach 15000 fps!

Installing Cg.

Cg is a library for easy graphics creation from NVidia. While not specifically required for Ogre, it is good to have for advanced graphics work.

  1. Open a terminal and navigate to the directory containing the Cg  package.
  2. Extract the files from the package using tar xvfz Cg-1.4.1_x86.tar.gz
  3. Switch to the root user in order to install the files, by typing su  and entering the root password whe prompted.
  4. To install, type cp -R usr /
  5. Exit from root mode by typing exit

Installing DevIL.

  1. Navigate to the directory containing the DevIL source package
  2. Extract the source files by typing tar xvfz DevIL-1.6.8-RC1-src.tar.gz
  3. Type cd DevIL-1.6.8-RC1
  4. Type ./configure to configure the compile scripts
  5. Type make to compile the source code
  6. To install you need to be the root user, so type su
  7. Type make install to install the compiled package
  8. Exit from root mode using exit

Installing CEGui.

  1. Navigate to the directory containing the CEGui source package
  2. Extract the source files by typing tar xvfj cegui_mk2-source-0.4.1.tar.bz2
  3. Type cd cegui_mk2
  4. Type ./bootstrap && ./configure to configure the compile scripts
  5. Type make to compile the source code
  6. To install you need to be the root user, so type su
  7. Type make install to install the compiled package
  8. Exit from root mode using exit
  9. Open a text editor in root mode (Alt+F2, type kdesu kate can achieve this)
  10. Open /etc/bashrc and type export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig at bottom of the file. Make sure the last line of the file is blank, then close it and restart your terminal.
  11. Some of the source '.h' in /usr/local/include/CEGUI/elements have their #include lines defined incorrectly. You need to open a text editor in root mode and open ALL of the files in this directory. Some of the files referenced in the #include lines are defined as being in the current directory but are in the parent directory, while others are referenced as being in an 'elements' sub-directory but are in the current directory. For example, in the CEGUICheckbox.h file I had to change #include "CEGUIBase.h" to #include "../CEGUIBase.h"#include "elements/CEGUIButtonBase.h" to #include "CEGUIButtonBase.h" and #include "elements/CEGUICheckboxProperties.h" to #include "CEGUICheckboxProperties.h"

Installing Ogre 3D.

  1. Navigate to the directory containing the Ogre source package
  2. Extract the source files by typing tar xvfj ogre-linux_osx-v1-2-0.tar.bz2
  3. Type cd ogrenew
  4. Type ./bootstrap && ./configure -with-platform=GLX ato configure the compile scripts
  5. Type make to compile the source code
  6. To install you need to be the root user, so type su
  7. Type make install to install the compiled package
  8. Type ldconfig to update the shared library links and cache
  9. Exit from root mode using exit
And thats it! If all of that installed without error, then Ogre should work on your PCLinux system.

If you want to try it out, download this example from Linux Format. You will need to extract the files and open the Makefile in a text editor. Change the /home/noel/Apps/ogrenew/Samples/Common/include part to reflect your system: /YOUR/PATH/TO/ogrenew/Samples/Common/include. After that open a terminal and navigate to the directpry the Makefile is in and type make and then ./chad to run it. You chould first see a coinfig dialog and then a basic 3D world you can move around!





Hosted by www.Geocities.ws

1