Once you have the OgreDotNet DLLs, you are ready to start developing with OgreDotNet in your project!
Table of contents
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).
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 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
- OgreMain.dll or OgreMain_d.dll
- OgrePlatform.dll or OgrePlatform_d.dll
- Plugin DLLs
- 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
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.
Note: You don't really need the Quake3Settings.cfg.
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.
I have personally set this option to "PluginFolder=./Plugins", so all of my plugins definedin 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).
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)
Feel free to add your own implementation for your specific IDE such as VS2005 (Regular and express editions), MonoDevelop, SharpDevelp etc...