Submit Patch

Contributing bugfixes and enhancements to OGRE is always very welcome! We accept contributions in the form of patches, which are diffs against a current version of OGRE. We prefer diffs against the latest Mercurial copy if possible (stable branch for bugfixes, trunk for new features), although diffs against the last stable release are also acceptable. Details are shown below.

Contributor License Agreement

All contributors must agree to the OGRE contributor license agreement. Complete the details at the bottom of the agreement and scan/email or fax it to the address given at the bottom. The license agreement is required to ensure that OGRE can continue to be managed centrally and licensing enforced.

Commit Your Changes Locally

You should commit your tested changes to your local Mercurial repository. Please make yourself familiar with our Coding Standards before submitting your patch. Whilst we will fix up valuable patches it would be appreciated if you tried to stick to our styles and conventions in the first instance.

You should also read our Developer Guide (PDF) to make sure you adhere to our conventions.

Command-line patch creation (recommended)

If you have the command-line ‘hg’ tool available, you can create a patch from the root of the Ogre source tree like so:

hg export --git -o ogre_%nof%N.patch REVS

You should replace “REVS” with the revision numbers in your local repository that you want to send us (or a revision range REV1:REV3). This will create one patch file per commit called ogre_1of2.patch (and so on) which you should zip up and send to us.

Creating a Patch using TortoiseHg

Right-click on the ogre source folder, and select TortoiseHg > Repository Explorer. Select the start of the range you want to send us with the left mouse button, then right-click the end of the range of revisions and select “Export Patches from here to selected…”. Additionally you can also export them as a bundle as opposed to a range of single revision patch files by using the context menu option “Bundle from here to selected…”.

Submitting the Patch

Zip or tar the patch files, then use our Patch Tracking System to add a new patch record and upload the patch archive. Again, please make sure you have completed the OGRE Contributor License Agreement otherwise your patch may be rejected.

Questions?

In case of any questions, feel free to ask them in the developer section of our forums or contact the Ogre3D Team.