Fork me on GitHub


Haskell binding to OGRE

hogre is a Haskell FFI binding to a subset of OGRE.




See Hogre API documentation. You probably need the OGRE API documentation as well.


1. Install OGRE C++ libraries on your system. Consult your OS on how to do this. For Debian and Debian-like Linuxes, something like "sudo aptitude install libogre-dev" should do.

2. Install cgen, a program for generating C++ bindings for Haskell, which is needed by hogre. You can download the cgen source at github or install it from Hackage using cabal.

3. As hogre generates a C interface to OGRE and compiles it, you need a C++ compiler - on Debian and Debian-like distributions, "sudo aptitude install build-essential" should do.

4. (Linux/Unix):
cabal configure [--user] && cabal build && cabal install

pkg-config is used for determining the correct include and library paths.

Note 1: At least using cabal version the build step is actually unnecessary - hogre will be built during install phase.
Note 2: building hogre may take quite a while because of compiling C++. During this cabal will print no output. To see the build progress, use "cabal install -v2".

4. (Windows):
cabal configure [--user] && cabal install [--extra-include-dirs=c:\path\to\include\OGRE] [--extra-lib-dirs=c:\path\to\OGRE\lib\release]

The extra include and library directories must be supplied in case the OGRE headers and libraries are not in the standard include and library search path. Also, the Boost C++ headers must be found in the include path. The OGRE include path must be the first include path supplied.

5. OGRE does only graphics; for input, audio, networking etc. you need separate libraries. You're free to choose which (if any).

6. You may want to check out the hogre-examples package for some examples.


hogre is licensed under MIT. OGRE is licensed under LGPL for versions before 1.7.0 and under MIT for 1.7.0 and later. See the OGRE website for more information.


Antti Salonen (


You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://