MOGRE under MONO

Zonder

04-01-2013 13:18:25

See this article quite interesting http://www.mono-project.com/CPlusPlus

Tubulii

14-01-2013 09:12:58

Sure its interesting, but it seems that the article (the Summer of Code GCC CIL project) is from 2005. Right "now" there is cxxi as an alternative (which is not working with MS ABI and has not been updated for a half year).

Zonder

14-01-2013 13:36:54

I was more thinking of the Microsoft compiler been able to output pure cli code for c++ I never knew that was the case I always though it was mixed with native. Then again if ogre does compile I really doubt the render systems will work they would need writing with something that mono supports.

Also you would still need to wrap ogre probably for other languages to be able to used it due to data types and that.

If I ever get time I will have a closer look :)

Tubulii

14-01-2013 16:29:04

I was more thinking of the Microsoft compiler been able to output pure cli code for c++ I never knew that was the case I always though it was mixed with native. Pure cli for the interop, the native code is called via P/Invoke (pure mode). The implementation is still native. And you have to wrapp it by yourself first :-). There are two worlds clashing together, it is not that easy.

Zonder

15-01-2013 09:57:17

Not according to the Microsoft documentation it does generate just cli code. This means you can't use p/invoke so any native libraries wouldn't work

http://msdn.microsoft.com/en-us/library ... 90%29.aspx

Unless I am really misunderstanding something in there :)

Tubulii

15-01-2013 19:06:31

Ok, I think, I'll get it now: Pure means, no native function can be called, its purely managed -> Any interaction with the native world needs to be done with P/Invoke or similar. Some C++ specific thing like DllExport/... are not working. But if you want to test it: Write a native test project (one native class, one function print(string)), compile it with cli:pure and try to access it with C#. This should not be possible. C++/cli is designed to make it possible to work with both managed and native components. The compiler does the marshalling. A C# only sees the managed part of the library.

Quick links:
http://www.developer.com/net/cplus/arti ... lation.htm
Google Books

Zonder

15-01-2013 21:06:18

yeah that's what surprised me about the pure mode it makes c++ behave more like c# there would be major type problems though SSE won't work as memory alignment can't be done. also ogres types would need to be using managed types if you wanted the api to be consumable from other managed languages (not 100% on this though). rendering system would need to be xna or opentk based also (opentk means it would work under mono) also any dependencies would probably cause problems :) (thats mono related)

So it's a major bit or work I think and prob not worth the effort using p/invoke on other platforms would be easier :)

Ascendion

22-01-2013 02:40:25

There is an active fork of CXXI that has improved MS ABI support, and when I spoke to the dev he indicated he would be working on it in the near future (as in within weeks)... that conversation happened 3-4 weeks ago.. I'll see if there are any recent changes on his repo (its on the same repo server so you can search it up if interested..

https://github.com/tritao/cxxi

and yes.. looks like he dumped in a huge update about 2 weeks ago

Tubulii

25-01-2013 12:35:34

Oh, I haven't seen this fork before!
It would be great to have a working version of cxxi for wrapping all the ogre projects.