Managed Hydrax Wrapper        

Hydrax is a an add-on library for Ogre to render pretty water scenes.

With the Managed Hydrax -Wrapper (short form: MHydrax) Hydrax can be used by Mogre too.

I hope you enjoy MHydrax. Any feedback is welcome.

Author: raygeee (retired)
Project: Managed Hydrax -Wrapper
Current version: 0.5.1
License: GNU Lesser General Public License (free for any use)
Wrapped project: Hydrax
Wrapped project license: GNU Lesser General Public License (free for any use)
Type: C++/CLI -Wrapper
Dependencies: Ogre 1.7 / Mogre 1.7
(For Mogre 1.6 use MHydrax 0.4)

help For questions and latest information use this forum topic.


More pictures and a full feature list are available on the Hydrax page.


Original Hydrax (see Hydrax)


related to Hydrax 0.5 and MHydrax 0.5

Things to do in Hydrax

Adjustments in *.cpp-files to work with Ogre 1.4x: (as told in this thread)

  • Change these lines in MaterialManager::_createUnderwaterCompositor()
Ogre::PixelFormatList l;
    TDef->formatList = l;


TDef->format = Ogre::PF_A8R8G8B8; // New code line for Ogre 1.4.x

  • Comment this line in Decal::setSize() if it's not already commented:
mProjector->setOrthoWindow(Size.x, Size.y);

  • Optional: Change Hydrax to compile as static library (*.lib). (You may still choose to not do that...)

The result is that the managed MHydrax.dll doesn't need any native Hydrax.dll.

Things to do in MHydrax project properties

  • In Framework and References: Adjust refence to Mogre.dll (the one corresponding to your current build mode)
  • In C/C++: Adjust additional include directories to match yours
  • In Linker: Adjust additional library directories to match yours

Things to do in Samples project properties

  • In References: Adjust references to Mogre.dll and MOIS.dll (the ones corresponding to your current build mode)
  • General things to do:
    • Copy folder "Media" from Hydrax to MHydrax solution directory or adjust the resources.cfg.
    • Make sure the dlls Ogre needs to run are in the debug/release folders. (OgreMain, OIS, OctreeSceneManager, CgProgramManager, cg, RenderSystems..)


An almost similar Samples project like in Hydrax is included. It's written in VB.NET code, but can be easily translated to C# or any other managed code language. For example by the VB.NET-to-C#-Converter:

Also you can look to the MHydrax code example.

Wrapper status

Wrapped classes (with prefix 'M' in MHydrax):

  • Hydrax (as far as the other wrapped classes allow)
  • Module
  • ProjectedGrid
  • SimpleGrid
  • RadialGrid
  • Noise
  • Perlin
  • FFT
  • MaterialManager
  • CfgFileManager
  • GodRaysManager
  • DecalsManager
  • Decal
  • Mesh
  • Size
  • several Enum classes

Classes not wrapped yet:

  • GPUNormalMapManager
  • RttManager
  • TextureManager

Known bugs:

See also

Alias: Managed_Hydrax_Wrapper, MHydrax