Showing posts with label OGRE SDK. Show all posts
Showing posts with label OGRE SDK. Show all posts

Oct 21, 2009

Ogre on Ubuntu

Ubuntu / Kubuntu

The following guide is for Ubuntu 8.04 and newer. For older versions please go here

Please post feedback in this thread

I will not do a lot of explaining here and will assume that you know what each command does or at least know how to look it up. This is a guide to get you up and running as fast as possible on Ubuntu.

  • Go to some directory you have write access to.


cd ~/Desktop
  • Uncomment all Ubuntu repositories in sources.list.
sudo nano /etc/apt/sources.list
  • Run apt-get update.
sudo apt-get update
  • Install necessary packages.
sudo apt-get install pkg-config build-essential autoconf automake libtool libzzip-dev libxt-dev libxxf86vm-dev \
libxrandr-dev libfreeimage-dev nvidia-cg-toolkit checkinstall libfreetype6-dev libpcre3-dev libopenexr-dev \
freeglut-dev mesa-common-dev libtiff4-dev libglademm-2.4-dev libcppunit-dev libxaw7-dev libxaw-headers libois-dev
libxaw-headers is obsolete on Ubuntu 9.04 and can be dropped from the list.
A sufficiently recent version of OIS (at least for Ogre 1.6.x) is available in the libois1 and libois-dev packages, and at least for 9.04 and beyond (older Ubuntu versions not tested).
Many of these packages may already be installed, but this list makes sure we've covered all the bases.
  • Setup OIS (Object Oriented Input System) -- note that this is potentially obsoleted if libois-dev and libois1 are present for your distro version:
wget http://downloads.sourceforge.net/wgois/ois_1.2.0.tar.gz
tar xzf ois_1.2.0.tar.gz
pushd ois
aclocal && ./bootstrap && ./configure
make && sudo make install
popd
  • Setup CEGUI (Crazy Eddies GUI System):
wget http://downloads.sourceforge.net/crayzedsgui/CEGUI-0.6.0.tar.gz
tar xzf CEGUI-0.6.0.tar.gz
pushd CEGUI-0.6.0
aclocal && ./bootstrap && ./configure
make && sudo make install
popd
CEGUI-0.6.2 is available and can be used instead, but depending on system configuration you may need to add '#include ' to RenderModules/directfbRenderer/directfb-renderer.cpp
  • Setup Ogre3D:
wget http://downloads.sourceforge.net/ogre/ogre-v1-6-3.tar.bz2
tar xjf ogre-v1-6-3.tar.bz2
pushd ogre
aclocal && ./bootstrap && ./configure
make && sudo make install
popd
  • Complete installation:
sudo ldconfig
If during linking your program code, you get an error:
OGRE/GLX/OgreTimerImp.h:33:31: error: OgrePrerequisites.h: No such file or directory
Then add a '../' in the OgreTimerImp.h file so that it reads #include "../OgrePrerequisites.h" to find the file.

If it all ran fine you now have a dirty (but quick) source-compiled installation of Ogre3D, congratulations! The demos are located at /Samples/Common/bin/

If during execution you get an error such as:
(0) : fatal error C9999: *** exception during compilation ***
Cg compiler terminated due to fatal error

Then your Cg installation may be too old. Currently this appears to be the case with Ubuntu 9.04, which is providing Cg version 2.0.0015.

To get an updated version of Cg:
Visit the Nvidia download page to get the appropriate architecture: http://developer.nvidia.com/object/cg_download.html
Do not extract the archive. You want to save it as the original .tgz file.

sudo apt-get remove nvidia-cg-toolkit
cd /
sudo tar xzf path/to/Cg-X.X_DATE_ARCH.tgz

You may wish to recompile Ogre to ensure it picks up any changes in the Cg version. (cd ogre; make clean; make; sudo make install)

Enjoy.


error: ‘ILvoid’ was not declared in this scope

-> replace "ILvoid" with "void"

Jul 2, 2009

OGRE SDK for Vista and Visual 2008

1 - Download OGRE SDK for your compiler : Here

2 - Download OGRE SDK AppWizard for your compiler : Here

Note: They are for VS2008, if you want to setup Ogre SDK for VS2005 or others, please look at this link.

3 - INSTALL OGRE SDK

Very important!

Do not install this into a directory name with spaces in it, like "My Documents" or the like. You are only asking for trouble.

Choose a sensible no-spaces-in-it name, like C:\OgreSDK.
Install the OGRE SDK.

After installation, we are checking that everything is alright. We want the OGRE_HOME environment variable present, and we want it to point to where the OgreSDK is installed.

It happens by default, but we are checking anyway.

Right-Click the "My Computer" icon, go to the Advanced tab and click on the Environment Variables button.




You should see an OGRE_HOME environment variable pointing to your newly installed OGRE SDK.

4 - OGRE AppWizard

* Unzip folder under C:\OgreSDK. After that, go to C:\OgreSDK\ogresdkwizard90_v1_5_1\Files\

* Open OgreSDKAppWizard90.vsz with Notepad.
* Edit paramater ABSOLUTE_PATH to C:\OgreSDK\ogresdkwizard90_v1_5_1\Files
* Then copy OgreSDKAppWizard90.ico, OgreSDKAppWizard90.vsdir and OgreSDKAppWizard90.vsz to {Microsoft Visual Studio 9.0 PATH }\VC\vcprojects or if you use express edition {Microsoft Visual Studio 9.0 PATH }\VC\Express\VCProjects

5 - Create a New Project and Build it on VS2008, just like on the this web site.

6 - Then execute the exe document in your OgreSDK/bin/debug.

7- If it is working, Good Job ! If it is not and gives some dll errors, such like d3dx9_xx.dll, d3dx10_xx.dll etc. Go to http://www.m3fe.com/content/d3dx/ web site and download the missing dll to your OgreSDK/bin/debug. and now, run it :D

Enjoy programming with Ogre3D !

Visual Studio Keyboard Shortcuts

Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...