Unfinished Hydrax wrapper :(


26-08-2008 02:39:04

Hello ppl,

unfortunate iam not able to finish this wrapper, coz of the lack of knowledge :/.

I have spent 3 full days into this wrapper, and even if its not finish, it cant be that much to finish...

the wrapper is finish (i think it only coz iam clr n00b) until the point Hydrax.setModule(Module);

Every other options seems wrapped fine (maybe there is even much more to port i didnt know it :oops: ).

But i think, a guy who has allready written some wrappers should be able to finish that very quickly.


Please download someone this project and finish it PLEASE!

I'd love to see Hydrax running on Mogre

Gl & hf,
sad Bostich :(


26-08-2008 03:37:00

hey great effort i going to download and take a look. Maybe i could finish it! :D



26-08-2008 03:40:26

Hi Marioko,

hopefulley you get it, and this source isnt that big bullshit :D.

Let me know if u need some info (even let me know if u need coffe!! :D)



Maybe its usefuel for you to here is my Test code for c#

public class HydraxDemo : BaseScene
#region - Deklarations -
protected const int _def_PGComplexity = 256;
/// <summary>
/// Water simulator.
/// </summary>
MHydrax.MHydrax mHydrax = null;
/// <summary>
/// This is our Skybox Container.
/// </summary>
String[] mSkyBoxes = {
/// <summary>
/// Predefined Sunpositions.
/// </summary>
Vector3[] mSunPosition = {
new Vector3(0,10000,-90000),
new Vector3(0,10000,-90000),
new Vector3(13000,0,120000),
new Vector3(-50000,-5000,50000),
new Vector3(0,0,0),
Vector3[] mSunColor = {
new Vector3(1,0.9f,0.6f),
new Vector3(0.75f, 0.65f, 0.45f),
new Vector3(1,0.6f,0.4f),
new Vector3(1,0.4f,0.1f),
new Vector3(0,0,0),

MHydrax.MModule.MProjectedGrid.Options[] mPGOptions = {
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity),
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity,45.5f, 7.0f, false),
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity,32.5f, 7.0f, false),
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity,32.5f, 7.0f, false),
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity,20.0f, 7.0f, false),
/* MHydrax.MNoise.MPerlin.Options mPerlinOptions[] = {
new MHydrax.MNoise.MPerlin.Options(
/// <summary>
/// The current Skybox index for our Skybox Container.
/// </summary>
protected int mCurrentSkyBox = 0;

public override void CreateScene()
//Create the Skybox

//Set some camara Params
mCamera.FarClipDistance = 99999 * 6;
mCamera.Position =new Vector3(4897.61f,76.8614f,4709.9f);
mCamera.Orientation = new Quaternion(0.487431f, -0.0391184f, 0.869485f, 0.0697797f);
//Create Hydrax object
mHydrax = new MHydrax.MHydrax(mSceneMgr, mCamera);
//Set RTT texture Quality
mHydrax.SetRttOptions(new MRttOptions(MTextureQuality.TEX_QUA_1024,

//Set Hydrax Componennt

// Create our projected grid module
MHydrax.MModule.MProjectedGrid mModule
= new MHydrax.MModule.MProjectedGrid(//Hydrax parent object
//Noise module
new MHydrax.MNoise.MPerlin(),
//Base Plane
new Plane(new Vector3(0, 1, 0), new Vector3(0, 0, 0)),
new MHydrax.MModule.MProjectedGrid.Options(_def_PGComplexity));

//Set our module
//Create Water

public override bool OnFrameStared(FrameEvent evt)
return true;



26-08-2008 15:31:59

hey thanks, this is just i need!! xD


26-08-2008 17:10:52

Hi Marioko,

can you say anything about the wrapper after a very first look?



26-08-2008 19:48:26

sometime ago i have planned make an Hydrax wrapper for MOGRE, and your wrapper is very close i planned. I need test it and take a closer look to know if work!! :D

thanks again,


27-08-2008 11:10:25

Oh nice - just because of this forum thread I know about Hydrax.
Working with Ogre would be great!

Also I created a Wiki article about Hydrax:


27-08-2008 12:07:33

Hi Beauty,

i just have a smile on my face, whenever you are writing wikis :). Iam not that long here but i have allready regnorized that the wiki writing, must be a hobby :D.

nice work :)


27-08-2008 13:02:41

It makes me happy to see you smile :D
Some people spend time to develop free Ogre software. Other ones helped me with my problems.
I don't know much about internals, but this is my way to give something back to the community.
The wiki is a nice place for documentation!


27-08-2008 19:51:44

nice Wiki post Beuty!


27-08-2008 23:47:46

Most parts of this article are just a copy&paste from the forum 8)
Maybe this were 15 minutes work for me. Nothing in comparison with the time that the author did spend for developing Hydrax. Or in comparison with Bostichs time to write the wrapper.


01-09-2008 12:28:19


can you say anything about the current state of your version of the wrapper?



02-09-2008 14:10:53

sorry i was very busy last week, i am organize my schedule to get time to finish the wrapper. Stay alert!! :D

Currently i also working in update MOGRE to 1.6 and that is a litttle hard right now!

Please wait...


19-09-2008 12:48:11

Hi Marioko,

any news? :)


26-09-2008 10:13:51

Any news?? :lol: :o :roll:


23-10-2008 14:32:04

Hydrax 0.4 is out now. The author said that there are many improvements (and public changes?).

It would be nice if you could update your currently ready parts. So it's less work for other helpers (like Marioko) to finish the wrapper it.

If someone want to finish the current wrapper code related to the old Hydrax version 0.3, here you find the old files:
http://modclub.rigsofrods.com/xavi/Hydr ... _Demo1.rar


24-10-2008 11:29:28

Hi Beauty,

The wrapper is in same state as i posted long time ago here. I have written a full port of Hydrax 0.3. But there are still some Bugs in, thats the reason why i didnt post it for now. If anyone is interested in a unfinished Hydrax version (i think 99% of version 0.3 is allready finished).

I will never finish this, coz i switched to XNA. Coz of the lack of (in my opinion) unfinished mogre wrapper. Its a big pain to get things to work with the mogre wrapper.



24-10-2008 12:53:02

Oh, how much work you did :oops:

I generally suppose a wrapper is nice, because it's not so much work to update for a new version of the wrapped code.
On the other side a port can be modified and debugging should be more easy (I think).

What are the main reasons that you think Mogre is unfinished?
How are your experiences with XNA?
Did you just test it or still made a big project?


24-10-2008 13:56:43

Oh, how much work you did :oops:

Yes, i did. But it's fun for me to develop things :P.

I generally suppose a wrapper is nice, because it's not so much work to update for a new version of the wrapped code.

100% signed, but as the start post indicates, iam just to stupid to get one workin :? .

What are the main reasons that you think Mogre is unfinished?

Well, thats just my opinion, and its no offense to the great work of Bekas / Marioko / Anything else, but:

In 95% during testing the wrapper, unsafe code was needed.
Some snippets can't be translated, due to the lack of classes in Mogre-Wrapper (just for example, have a look into the Grass-Demo).
...just to name a few

How are your experiences with XNA?

The biggest disadvantage of XNA, is his age. If u have closer look, u will realize that there just a few engines out there (Open sourced) and they all have much much less features then ogre.

the main advantage of xna is that this framework works like a charm with c# (what a wonder :lol:). Much tutorials.

Last but not least:
I can focus on developing things. On mogre the mainjob was how to figure out how things will getting work.

Did you just test it or still made a big project?

More testing then building a big project...



26-10-2008 09:36:07

Hi to all of you.

I've been reading this post now, and downloaded the current "release".
I tried to compile it, but it gives me:

Error 2 Command line error D8016 : '/GL' and '/ZI' command-line options are incompatible cl Demo1

(I am a vb coder, so I have limited knowledge of how to resolve this in the source code).

And I have some questions (exscuse my basic knowledge on this):
This wrapper, does it work like "add reference" then point to DLL,
then you use this as you use other DLL reference while coding?

If so, is there a precompiled DLL that I can test?


30-10-2008 16:58:30

I'm assuming that you reference the DLL and then you make an instance of the class, and use the methods from it.

I have seen the demos of Hydrax, but haven't had a chance to play with it yet.

Even though I'm very busy at the moment, I'm willing to take on the challenge of porting v0.4. Does anyone know if we can take the ported 0.3 version and upgrade it to 0.4, or do we have to / is it best to start from scratch to port 0.4?

Also, I have never wrapped a C++ component before so that it works in C#, but is it worth making a wrapper for 0.4 rather than converting the code?

I haven't even looked at any of the code yet, so I don't even know how many lines of code there are, but like I said, i'm willing to convert the C++ to use Mogre and C#... has any one started with this yet? Where do I start?


30-10-2008 18:10:04

The author made many changes from 0.3 to 0.4 version.

If you want to port the new version I think it's better to start from scratch and just look to the 0.3 code as a howto. If you want to update the ported code you have to compare so much lines of code that you possibly need more time than writing new.

With the view to the further development of Hydrax I suppose it's better to use a wrapper. It's not so much work and much more easy to update. (don't touch the complete code, only wrap the public members)
The problem is - you need to know how to handle with C++/CLI.

But keep in mind - both ways can take more time than you suppose.


31-10-2008 12:45:53

Is there a working version for mogre at this time?
(even if it has limited functionality)?


31-10-2008 13:17:12

As i read in this thread there is no ready version for Mogre.

The wrapper for 0.3 is 95% ready.
(the link is in the first post)

The 0.3 port is mostly ready, but doesn't work well.
(if somebody want to have it, ask Bostich)


04-11-2008 09:34:03

I stumbled on to this page in the wiki:


Half way down it talks about using cpp2java to wrap ogre, can we use this to wrap hydrax? Has anyone tried this already?


04-11-2008 16:18:21

nice point RichTufty,
Personally i do not have the knowledge on how to do this..
But sounds like it might work?


04-11-2008 16:20:23

Well i'll have a look in to it when i get 5 mins, if no one else has looked in to it...


04-11-2008 16:51:26

If you could write down some text about how-to,
then it would be nice! (alway good to learn about new things for a newcomer like me).


07-11-2008 13:51:21

Any luck on this one? :)


07-11-2008 14:20:21

I haven't had a chance to look at this properly yet, I was going to have a look this weekend! I can't even get the Hydrax demo to work yet :?

I was also waiting to hear from anyone else if they've looked in to this, as they haven't then I will.

As soon as i do then I'll post info here!


10-11-2008 13:17:32

Finally had a chance to look at the Hydrax C++ Demo over the weekend, spent most my time trying to get it to build, but finally got there. I'm still having problems viewing the demo, but the actually Hydrax dll built...

... so my next step is to work out how to wrap it when i get my next spare 5 mins :D

I'll keep you posted!


11-11-2008 15:48:20

Hi RichTufty,

if you have any Questions, feel free to ask :). Iam not very well at this, but i have looked into hydrax many time, so maybe i can help you with that ;)



05-12-2008 14:29:26

any news? :)


23-01-2009 19:32:31

Does anyone have a working link to the unfinished Hydrax wrapper?
The one on the first page doesn't work anymore...

Maybe someone downloaded it and can upload it again?


01-02-2009 15:14:06

Yeah,i would love to give it a read also. Is there any other place we can download the unfinished hydrax wrapper?


01-02-2009 16:03:16

I wrote a wrapper for Hydrax 0.4 from scratch. The included demo is working already, but many of the other functions still have to be wrapped.
I'll post my version here when I'm done in a few days (depends on my free time).
So, if you guys are a little patient you can save yourself the trouble digging into C++/CLI. :-)
Currently I'm fighting with AccessViolationExceptions because Dispose doesn't work properly. The managed code-world is so much easier... :(


04-02-2009 21:28:05

This sounds interesting. Maybe somehow you can merge both versions?
Or are there many differences between the wrappers?
Wouldn't it be more easy to add the missing members instead of re-writing the wrapper from the scratch?


09-02-2009 23:26:51

Got a working version. Look here.


09-01-2011 04:45:27

raygeee has been AWOL for 20 months and wrapper doesn't use pinvoke to do the native->managed transition, and is a nightmare to troubleshoot. I believe nobody's been successful in compiling it for 1.7.1, and I'm not about to wreck my whole stack just to use this! seems we need the original wrapper. How would I go about rewriting another wrapper using pinvoke, NOT static linkage like MHydrax...


09-01-2011 12:56:46

The download link of the first post is dead.
Is anybody here who has a copy of this unfinished wrapper code?
If yes, please re-publish it - for the case that somebody like to finish it.