Setting up OgreDotNet in your project

Once you have the OgreDotNet DLLs, you are ready to start developing with OgreDotNet in your project!

The DLLs

There are quite a few DLLs required to run an OgreDotNet-enabled application; not just the OgreDotNet DLLs, but also the Ogre SDK DLLs for the corresponding build type (debug or release).

OgreDotNet DLLs

The OgreDotNet DLLs that were built are:

  • Math3D.dll - Required
  • CeguiBindings.dll - Optional if you're using CEGUI
  • CeguiDotNet.dll - Optional if you're using CEGUI
  • OgreBindings.dll - Required
  • OgreBindings_Cegui.dll - Optional if you're using CEGUI
  • OgreDotNet.Cegui.dll - Optional if you're using CEGUI
  • OgreDotNet.dll - Required
  • GangstaBindings.dll - Optional if you're using Gangsta
  • GangstaDotNet.dll - Optional if you're using Gangsta

These files will be named the same thing regardless of the build type (debug or release).

The Ogre DLLs

The Ogre SDK comes with a "bin" folder, which contains both release and debug versions of DLLs. The DLLs are the same between the two folders, except that debug versions have a _d appended to the end (for example OgreMain_d.dll (debug version) instead of OgreMain.dll (release version)).

The Ogre DLLs you will need can change depending on what you are intending on using. Some may be excluded because they are not going to be used by your application (a good example of this are the plugins for different scene managers that you don't intend on using). For beginners, we recommend you simply copy them all, so you are sure to have them if required.

  • If you are using CEGUI:
    • CEGUIBase.dll or CEGUIBase_d.dll
    • CEGUIFalagardBase.dll or CEGUIFalagardBase_d.dll
    • CEGUITaharezLook.dll or CEGUITaharezLook_d.dll
    • CEGUIWindowsLook.dll or CEGUIWindowsLook_d.dll

  • Recommended/Required DLLs
    • cg.dll
    • DevIL.dll
    • ILU.dll
    • ILUT.dll
    • OgreMain.dll or OgreMain_d.dll
    • OgrePlatform.dll or OgrePlatform_d.dll
    • zlib1.dll

  • Plugin DLLs
    • Plugin_BSPSceneManager.dll
    • Plugin_CgProgramManager.dll
    • Plugin_OctreeSceneManager.dll
    • Plugin_ParticleFX.dll
    • RenderSystem_Direct3D7.dll - You can remove this if you don't want to offer support for DirectX7
    • RenderSystem_Direct3D9.dll - DirectX 9 support
    • RenderSystem_GL.dll - OpenGL support

The Config Files

Ogre uses a number of config files which are also found in the bin/release and bin/debug folders.

  • plugins.cfg - Tells Ogre what plugins to load on startup.
  • resources.cfg - Tells Ogre where your resources (such as meshes, overlays, etc) are.
  • media.cfg

Note: You don't really need the Quake3Settings.cfg.

Setting up the files

Your first step is to copy all of the required DLLs to your project's output folder. It is important that they are all in the same folder, because they reference each other.

Note: Plugins.cfg has a "PluginFolder" option, where you can specify a plugins folder.

I have personally set this option to "PluginFolder=./Plugins", so all of my plugins defined

in this file reside in a subfolder to keep them out of the way.

Be sure to copy all of the DLLs and the Plugins listed above, removing the ones that you won't be using.

You will also have to copy the "media" folder from the OgreSDK and edit the resources.cfg to point to the right places (removing relative paths, or fixing them so they point to the right place).

Setting up your IDE

VS 2003

To start an OgreDotNet project, create a new console application, and name it whatever you want.

Go to the solution explorer, and under References, add the following DLLs found in your project's output folder (Do NOT reference the ones in the Ogre SDK output folder, or OgreDotNet/bin folder!):

  • OgreDotNet.dll (required)
  • Math3d.dll (required)
  • CeguiDotNet.dll (optional - Use if you are using CEGUI)
  • OgreDotNet.Cegui (optional - Use if you are using CEGUI)
  • GangstaDotNet (optional - Use if you are using Gangsta)

Other IDEs

Feel free to add your own implementation for your specific IDE such as VS2005 (Regular and express editions), MonoDevelop, SharpDevelp etc...