This week I have been helping out with an open source project called Mogre. My mission is to continue the work of another user (Amirabiri) on the MogreBuilder project to automate the build process of Mogre. Over the course of the next few weeks I would like to make the build process much easier and add some new features.

What is Mogre?

Mogre is a .NET wrapper around Ogre, the popular open source graphics engine. It has been developed and maintained by many users over the years. Mogre wraps the Ogre code using C++/CLI code that is automatically generated from a combination of tools. Once complete a stable .NET DLL is produced that allows .NET developers to make use of the powerful Ogre rendering engine in games and tools.

What is MogreBuilder?

The steps involved building Mogre manually is pretty involved. The whole process can take a few hours if you have never done it before and if you encounter any errors along the way it can be tough debugging them. To make this process easier a tool has been developed with the intention of automating the entire process. This should make it a lot easier to build new versions of Mogre each time a new version of Ogre is released.

The tool automates many of the steps but still has a lot to be desired. There are still a number of steps involved and the documentation is limited.

Part 1 – Building Mogre using the auto-builder

I had to make a number of changes to the original source code of the MogreBuilder.
I run the MogreBuilder after each of the following steps to find the next error and fix it.

I have Microsoft Visual C# 2010 Express installed.
I’ve also installed TortiseHg at some point in the past

  1. Download and compile MogreBuilder source as a zip file from
  2. Created C:\Mogre and set the command line parameter in project properties
  3. Downloaded Mogre source as a zip file from
  4. Extracted the source into C:\Mogre
  5. Downloaded and installed cmake from (add to system path)
  6. Get Ogre source using the command line: (run from the C:\Mogre\Main\OgreSrc directory)
    hg clone -u v1-7
  7. The patch failed for file OgreCodec.h so I manually patched it using the reject file.

The auto-builder ran successfully.

The end result

For the moment I haven’t loaded the source code into a repository yet (lack of time), but if you want to have a go at repeating the process yourself you can download my changes to the MogreBuilder in a zip file or you can jump right to the end result and download the .NET 4 binaries.

Modified MogreBuilder source
Mogre .NET 4 Binaries

What’s next?

A few steps can be taken to make development easier:

  • Uploading the source code to a repository.
  • Getting feedback on what’s most important
  • Getting help from other developers

There are loads of little improvements that could be made to the MogreBuilder including:

  • Adding a GUI
  • Automating more of the steps
  • Fixing the patching issue
  • Documentation
  • Adding in other components (Terrain and Paging)
  • Allowing the user to choose which steps to execute (skip the compile if you know it’s already complete)

More information

There is a development thread on the Mogre forums.