Tutorial for 'Configure OGRE on Windows'

For those in the class who would prefer to use Windows here are some tips on how to get it working on your system.

OGRE 3D Setup

Step 1: Get Visual Studio C++. An express edition can be found here

Step 2: Get the OGRE SDK for your version of Visual C++ installed here. If you are having difficulty look in this wiki entry.

Step 3: Follow the approach that works the best for you in order to set up an application. Various methods are shown in this wiki entry. I would recommend getting the Application Wizard installed for the easiest setup. Directions for this can be found here

Note: You will need to have DirectX installed in order for Ogre to work on Windows. If you don't have it installed you can find DirectX 9 here

Starting Your First Application

Step 1: Set up an application in Visual Studio as an "OGRE SDK Application". This will set up relevant paths and options for properly compiling an OGRE application.

Step 2: Create an Empty OGRE SDK Application (by selecting Empty project in the OGRE Application Wizard), copy the source files into your new project folder, add the source files to the Visual Studio project by right clicking on the project name in the solution explorer and choosing Add>Existing Item.

Step 3: Applications built with the OGRE Application Wizard copy the executable of your project into $(OGRE_HOME)/bin/$(ConfigurationName). If you installed your OgreSDK to the C:/ location and you were building a debug version of your project the executable would be copied to C:/OgreSDK/bin/debug. This is important because the files that tell your Ogre application where to look for models, textures, etc is located in this folder and must be modified if you want to use any media files that don't come packaged with the SDK. In order to point your executables to a personal media folder you have to edit the resources.cfg file. The contents of the file should look like this to begin:

# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework

# Resource locations to be added to the default path

If you want to add a media folder in the C:/ directory you would add the following entries to the bottom of the file:


Setting up Blender

Step 1: Get the Blender installer here.

Step 2: Install Python 2.6 from here.

Step 3: Download Blender Exporter (direct link here. Extract the zip archive into the Blender scripts folder. In Vista it exists in your Drive:\User\UserName\AppData\Roaming\Blender Foundation\Blender\.blender\scripts\.

Step 5: To install OgreXMLConverter you can install OgreCommandLineTools (which includes OgreXMLConverter) from here. Once this is installed find OgreXMLConverter.exe (typically located in C:\OgreCommandLineTools). You can then convert a mesh.xml file into a .mesh by opening up the command prompt (Go to Start>Programs>Accessories>Run then type in cmd) and running the command:

C:\OgreCommandLineTools\OgreXMLConverter.exe yourModel.mesh.xml