Managed Hydrax Wrapper        
Print


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(external link) (free for any use)
Wrapped project: Hydrax
Wrapped project license: GNU Lesser General Public License(external link) (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(external link).

 

Flash player not available.

Hydrax_04_2.png

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

Downloads

 

 
Original Hydrax (see Hydrax)

 

Installation

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(external link))

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

to:

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..)

 

Samples

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: codeconverter.sharpdevelop.net(external link).

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


Contributors to this page: Beauty13675 points  and jacmoe171980 points  .
Page last modified on Monday 12 of September, 2011 23:14:37 UTC by Beauty13675 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.