Mogre MyGUI wrapper        


With the Mogre MyGUI wrapper it's possible to use the MyGUI system by Mogre.


mstoyke wrote:
I'm currently using a slightly extended version of MyGUI with their C++/CLI wrapper. It's a very good GUI system and the .NET bindings work very well. You can even use their layout editor and use the GUI layouts easily. I'm too busy right now to write detailed instructions on how to get it work but I can offer to post a patch in unified diff format with my changes and some lines of example code.

More information you find at the MyGUI website link).

Ogre related information you find in the MyGUI forum(external link) (section of the Ogre forum).
Related to the Mogre wrapper there is a special forum topic: Managed MyGUI(external link)

Info For Mogre related questions you can open a thread in the Mogre forum(external link). Additionally you could invite user mstoyke(external link) to answer. (Please don't discuss by message - do it in public so that it helps other people, too.)




Flash player not available.
Flash player not available.



The source code you can get in the download area(external link) of the MyGUI website.
The Mogre/.NET wrapper is part of the MyGUI project and can be found in the MyGUI repository(external link).

Additionally look to the binary download section(external link). It contains the Mogre wrapper, dependencies, demos and the layout editor.




Tubulii wrote:
I am using MyGui in my mogre app successfully. It wasn't hard, anything you need is here(external link) and here(external link)(all for Mogre 1.6.5.)
The second one is optional, but there is one file you need: export.vs . This codefile contains some functions to init and destroy MyGui. I never tried to use the MOGREframework in that package, I used the one in the Wiki. Some classes aren't wrapped, but all basic things seams to work fine.
(Quoted from this forum post(external link) in January 2010)


Wrapper details

The MyGUI repository has the directory Wrappers(external link). This contains several subdirectories. For some we know the meaning:

  • MyGUI.Export (C++): . . . . Exports all needed functions of the native MyGui
  • MyGUI.Sharp: . . . . A C# Wrapper of MyGui (needs file MyGui.export)
    • The depencies are MyGUIEngine.dll and MyGui.export.dll (and .NET)
    • For Mogre is only an indirect depency: You need Mogre for creating MyGui.export.dll
  • MyGUI.OgrePlatform.Export(C++): . . . . Exports all needed functions of the native MyGui
  • MyGUI.Managed: . . . . A CLI/C++ Wrapper (needs MyGUI.OgrePlatform.Export)

MyGui.managed and seems to be equal. Maybe the C# one is a port of the managed one and not a build from scratch.

The original post from Altren:

Altren wrote:
Hello from MyGUI project! We have implemented generator wrappers for the library. Generator parsed data from doxygen, and with the help of templates, performs the generation of wrappers. At the moment there are templates for C# and Managed C++. It is also possible to setup generator for other languages if the need arises.

1. C# - MyGUI.Export.dll (exported functions) + MyGUI.Sharp.dll (wrapper using P/Invoke)
2. Managed C++ - MyGUI.Managed.dll (wrapper using CLR)



1. Download MyGUI and compile it with same Ogre version and with same visual studio as Mogre was built with (also MYGUI_BUILD_WRAPPER option in CMake should be enabled). See also link)
2. Compile MyGUI.OgrePlatform.Export(_d).dll
3. Generate Managed wrapper (to do this run WrapperGenerator that comes with MyGUI -> (in app select one by one)Generate Solution, Doxygen, Managed).
4. Compile MyGUI.Managed.dll in newly generated solution.
5. In Mogre add MyGUI.Managed.dll as referecnce
6. Use MyGUI initialisation from MyGUI.OgrePlatform.Export(_d).dll

Whole post: link)

Note: It seems that with .Net 4 the wrapper does not work anymore. The OgrePlattform.Export.dll ist not found (although its in the same directory). An workaround would be to merge it with the main wrapper project and so totally avoid all P/Invoke calls.

See also

MyGUI related:


Contributors to this page: Beauty14565 points  , Tubulii760 points  , TeaBag363 points  and jacmoe180265 points  .
Page last modified on Wednesday 20 of November, 2013 18:47:23 UTC by Beauty14565 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.