Some patches to fix or enhance Irrlicht 0.11

Irrlicht is an open-source 3D engine. Since there is no CVS support, yet, enhancements and bug fixes have to be maintained by other means while the next release is prepared by the Irrlicht developer. This web page provides a number of patches which allow to easily change the source code of Irrlicht. If there are reasons to revert these changes, it is usually possible by reverse application of the patch. Thus, new features can be safely applied and tested.

What's a patch?

Patches contain code changes in such a way that these changes can be automatically applied to a source tree. Thus, if you want to add some fix available as a patch you just apply this patch to your sources. You don't have to edit every file on your own and copy-and-paste from some website.

In order to apply a patch you need a source tree similar to that one of the patch's author. This usually means you should have the same release, but in some cases it might be the case that patches depend on others. The patches on this page are created upon Irrlicht version 0.11.
To apply a patch follow these steps.

  1. Download the patch
  2. Change into the Irrlicht source tree, i.e. the directory called Irrlicht where lots of *.cpp files are located.
  3. Execute the following command patch -p1 < patchfile
The patch command reads the patchfile and applies the changes to all files mentioned within. Since the name of the source directory might be different from that of the patch's author the patch is applied from within the source directory and the first element of each file path is removed by the command line option -p1. If you want to remove the patch again you may add the option -R to the command line.

If some errors are encountered during patching a backup file with extension .orig is created. This is also the case if only some warning has been issued due to a different location of the changes. In cases where the patch programme could not determine the correct location to apply the changes an error is issued and another file with extension .rej is created. This file contains all changes which could not be applied to the file.

To create a new patch based on your own modification you should do the following. Please note that you have to keep another source tree containing the original sources.