Mogre on MAC,Linux Operating System?

boyamer

23-04-2009 08:40:17

Is possible to use Mogre on MAC,Linux Operating System? is there any example?

GantZ

23-04-2009 10:20:28

it's not possible at the moment, and probably in the future, given the fact that mogre use c++/cli which only work on microsoft windows and is not supported by mono.

if you want to use ogre with dotnet on mac or linux, you could consider using ogredotnet. i don't think there is a lot of support on this plugin though.

boyamer

23-04-2009 10:37:07

and even using Mono Runtime is not possible?

AndroidAdam

27-04-2009 20:20:21

Why is it that OgreDotNet works with Mono? Is it not c++/cli as well? Also, wouldn't setting the project to clr:pure or clr:safe cause mono to be able to run it seeing as Mono shouldn't care how the IL was produced, just as long as it's valid?

I know that OgreDotNet was made using SWIG, but what does that actually do?

GantZ

27-04-2009 23:00:59

i don't know exactly the internal of ogredotnet, but i suppose it use p/invoke mechanics, which is different from c++/cli.
http://mono-project.com/Interop_with_Native_Libraries

with c++/cli, in the case of mogre, you create a mixed mode assembly that work only on windows platform, simply because the dll is not IL code only.
With clr:pure or clr:safe, you will loose the ability to use native library inside a .net compliant library, that's how mogre work.
there is more detail here.
http://www.mono-project.com/CPlusPlus

the main reason mogre use c++/cli is performance, p/invoke is costly, at least enough to consider c++/cli over it in the case of a 3d engine.

AndroidAdam

28-04-2009 04:13:32

So if I was to compile Mogre with either of those settings on, I would get errors; run time or otherwise? I guess it makes sense that dll's not using IL won't work, but the link you provided said they should work as long as they didn't rely on the MS CRT dll's.
It also said that if you set the option "ignore all default libraries" in the linker setting, this will generate a lot of linker errors for every CRT calls. If we did this and replaced all the CRT calls with some managed stuff, it should work correct?

GantZ

28-04-2009 09:26:11

you will not be able to compile mogre from the start. The workaround provide for mono work only if you make a pure c++/cli dll. something that will not reference any native dll. Mogre reference directly ogre.
the only solution here is to have a gcc compiler able to emit cil.
http://gcc.gnu.org/projects/cli.html
so mogre could be compiled on linux or other platform.
but i don't know how it is usable at the moment, and i don't think it include Managed C++. it would be surely a good thing to have a cross platform mogre. but ogredotnet seem the best solution when it come to portability. using swig to generate a wrapper still easier than update gcc to generate cil, and include Managed C++.