MyGUI with MOGRE

mharezlak96

13-11-2010 18:04:01

Hi. I loking for information about using MyGUI with MOGER. Where i cen download MYGUI for C# and how i cna use them?

Beauty

19-12-2010 21:47:52

Sorry for my late answer. I wasn't here for a longer time.
Some useful information about Mogre MyGUI wrapper I wrote to the Ogre wiki on yesterday. Look here:
http://www.ogre3d.org/tikiwiki/Mogre+MyGUI+wrapper

If you use MyGUI on your Mogre application, it would be great if you publish some code snippets here.
Or a tiny demo application. For this you can use the Mogre Wiki Tutorial Framework. It's fine for quick prototyping.

Alternatively you could use the GUI system Miyagi.

Tubulii

17-01-2011 19:55:53

Hi,

I am using MyGui in my mogre app successfully. It wasn't hard, anything you need is Here and Here(all for 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.

I hope that helps

(There's also a thread a round here, 'MOGRE with MyGUI 3.0.2' or something like that, its mostly the same ;))

Beauty

18-01-2011 20:18:12

Thanks for your note. I added it to the MyGUI wiki page.

If somebody get it to work with Mogre 1.7, feel free to give us details :wink:

Tubulii

18-01-2011 20:26:08

No problem, and I agree with you: The wrapper should be upgraded, and all classes of MyGui should be wrapped, until now it is still incomplete (no skinmanager, layermanager, some functions like (a shared version of) FindWidget, ...)

Beauty

18-01-2011 20:34:58

I never used MyGUI. So I ask this stupid question:
Is the .NET wrapper Mogre related? At least there seems to be one or more files with Mogre in its name.

Does anybody know which forum or post are used for the development of the .NET wrapper?

Then we could add a link to this developer place to improve the community contact. (e.g. the maintainers have a better update motivation, when they see that there is still an interest.)
Additionally -- If somebody of our Mogre community updates/extends the source code (like mstoyke did in the past), then he could ask in their forum to submit the modified source code or binaries. Maybe he also would get write access.

amirabiri

18-01-2011 22:42:34

For now the only option of using MyGUI with Mogre is using mstoyke's bundle.

Beauty

19-01-2011 00:28:39

The topic related the bundle is here: Mogre with MyGUI, PhysX and SlimDX

As I see now - also the modified source code of MyGUI is available.
So it's a good point for comparison (with the unmodified wrapper code) to see what's different.
Maybe this could help to update the MyGUI wrapper to work with the unmodified Mogre version.
https://bitbucket.org/mstoyke/enginedep ... a55/mygui/

Tubulii

19-01-2011 16:25:21

For now the only option of using MyGUI with Mogre is using mstoyke's bundle.
As I wrote, the one here is usuable, too. Mystroke's bundle is 6 months old, but the version on Sourceforge is newer, but only the source and I cannot compile it (no experince with (CLI/)C++).

The versions seem to be very similar (the result is the same: both work ;) )

Is the .NET wrapper Mogre related?.
What do you mean? It is compiled against MOGRE 1.6.5/1.4.8. I have no problems using it.

Beauty

19-01-2011 17:49:21

I mean the wrapper(s) in the public MyGUI repository.
https://my-gui.svn.sourceforge.net/svnr ... k/Wrappers

There are source directories for:
* MyGUI.Managed
* MyGUI.Sharp
* MogreFramework
etc.

I don't know the differences and what's related to Ogre.
Maybe the basis is a common .NET wrapper, which is independent of Mogre (anyhow it also works with Mogre).

Who knows the differences?
Which directories are needed for usage with Mogre?
Which projects (subdirectories) have to be build in which order to create the needed wrapper?

Tubulii

19-01-2011 19:09:05

Sorry, missunderstanding.

I looked at the files:
MyGUI.Export (C++): exports all needed functions of the native MyGui
MyGUI.Sharp: A C# Wrapper :D :D of MyGui (needs MyGui.export)
Build order: No idea, again I have no experience of C++, but the c# is easy of course, no mogre or mygui is needed(only indirect: the MyGui.export.dll), only system, system.xml and system.data ;)

MyGUI.OgrePlatform.Export(C++): exports all needed functions of the native MyGui
MyGUI.Managed: A CLI/C++ Wrapper: seems to be the one in my fist post(needs MyGUI.OgrePlatform.Export)
Same problem as above :(

Both seems to be equal (my version of MyGui.managed and MyGui.sharp), maybe the c# one is a port of the managed one and not a build from scratch

And of course, you need the native MyGui library (MyGUIEngine.dll).

I build a quick test-project but I need a MyGui.export-dll in order to test it.

Beauty

19-01-2011 21:10:46

Thanks for your research and summary :D
I added it to the section wrapper details of our wiki page.
(I hope I didn't make mistakes, because I modified the text slightly.)

Until today I don't need any GUI inside my render window (I use Windows.Forms instead).
So I'm (currently) not interested to spend much time for learning how to use and deep internal details.
But I want to support my community by collecting the needed information and maybe bring together the people who are interested in MyGUI usage and development. (I suppose a good information structure is also important for add-ons.)

Beauty

19-01-2011 21:33:16

I looked to the MyGUI repository.
8 hours ago was a modification in the file trunk/CMake/Packages/FindOGRE_Old.cmake.
It seems so that now an environment variable will be set. (The detailed code changes you see here.)

Also there were different changes in the wrapper directory (just 10 days ago).
Maybe now it's usable with the current Mogre version?

There seems to be no external MyGUI forum, but I found the e-mail adresses of 2 MyGUI developers. I will write them and ask for Mogre 1.7 support and invite them to this forum topic. Maybe they can help us to solve the wrapping problems.

Beauty

19-01-2011 21:59:56

Ok, now I wrote an e-mail to the developers.
Hi Altren and Thomas,

thanks for your nice GUI system (-:

I'm from the Ogre forum and maintainer of the Mogre wrapper (Ogre for .NET).

In our forum I read that there were problems to use or update your .NET wrapper for usage with Mogre 1.7.

It would be nice when you can help us to update your .NET wrapper.
Maybe some code modifications are needed or maybe we just need some special instructions.

Our current discussion about the MyGUI wrapper is here:
viewtopic.php?f=8&t=13640

Additionally I created a page about the .NET wrapper in the Ogre wiki:
http://www.ogre3d.org/tikiwiki/Mogre+MyGUI+wrapper
It doesn't contain a huge amount of information, but some important things like links. The content I want to extend in the future. For example how to use the wrapper, how to embedd MyGUI to a Mogre application.
Additionally we want to create a demo application for our Mogre SDK (but for this it has to work with Mogre 1.7).




In the past our Mogre member "mstoyke" used MyGUI and offered binaries.
I know that he did some modifications for a better usage. (Unfortunately I don't know details.)
If you are interested in these modifications, I can ask "mstoyke" to write more about.
Alternatively you can look to the mygui directory of his public repository:
https://bitbucket.org/mstoyke/enginedep ... a55/mygui/
Maybe you can see the changes there.


It seems so that you have no MyGUI forum. Maybe you are Ogre users, your main GUI target is Ogre and use the MyGUI section of the Ogre forum for discussion?



For my 3D application I don't use a GUI system (just .NET with Windows.Forms), but I like to help my Mogre community.
Also I think that a direct communication with add-on developers is useful.
This is the reason why I write to you.

Greetings from Germany

Beauty

Altren

19-01-2011 22:25:45

It would be nice when you can help us to update your .NET wrapper.
Maybe some code modifications are needed or maybe we just need some special instructions.
First of all me and MyGUI lead developer (nickname my.name, not Thomas though :), Thomas is developer of Rigs of Rods that helped us with CMake ) are ready to help you in any way you need. As far as I remember from other MOgre 1.7 related posts some users had problems with CMake and MyGUI compilation (Compilation step 1 there). Next steps are much easier than first one.

In the past our Mogre member "mstoyke" used MyGUI and offered binaries.
I know that he did some modifications for a better usage. (Unfortunately I don't know details.)
If you are interested in these modifications, I can ask "mstoyke" to write more about.
Alternatively you can look to the mygui directory of his public repository:
https://bitbucket.org/mstoyke/enginedep ... a55/mygui/
Maybe you can see the changes there.
Unfortunately he never suggested to include his changed into MyGUI wrappers sources and Ionly heard about them. I'll try to find changes that he made, but as far as I remember he wrapped one or few additional functions from MyGUI::Gui class and that's all.

It seems so that you have no MyGUI forum. Maybe you are Ogre users, your main GUI target is Ogre and use the MyGUI section of the Ogre forum for discussion?We use Ogre forum and discussion about Mogre + MyGUI definetly fits for Ogre forum :) I can keep checking this thread and I'm regularly but not frequently (few times per month) searching for questions about MyGUI in other forums, but the only forum that I check frequently (usually several times per day) is MyGUI forum here in ogre addons. So if someone need help with MyGUI it is recommended to ask there.

amirabiri

19-01-2011 23:46:39

Hi Altren,

You can check mstoyke's code here: https://bitbucket.org/mstoyke/enginedeps/src. You can just checkout his code and diff it with yours.

As far as I can tell the main difference is in how the Gui object is initialized. Here is a snippet from my project:
unsafe
{
Gui.Initialise(
new IntPtr(mWindow.NativePtr),
new IntPtr(mSceneMgr.NativePtr),
"core.xml", "Gui", "gui.log"
);
}


Obviously it's not ideal - it forces us to pass native pointers wrapped in managed code but still forces the project to be "unsafe". Either way this is the only thing that I managed to get working. I was just not able to initialize the official managed MyGUi with Ogre 1.7 (the one published on your website which was released for Mogre 1.6.5). And I was also unable to compile MyGUi.

Generally speaking I think it would be good for everybody if you just release a binary build of MyGUI that works with Mogre 1.7. Don't count on us compiling MyGUI it's very complicated and us managed folks don't handle compiling complex C++ projects all that well... :-) it will just mean much less usage of MyGUI which is a shame because it's a great project.

Altren

20-01-2011 00:00:35

I can't "just release" binary build, because there are different versions of Visual Studio/Ogre/MOgre/MyGUI and of course different users need different combinations. Even if we can choose one set of libs versions there is still differens versions of Visual Studion (2005/2008/2010) and there is no way for me to make binaries for each.

Beauty

20-01-2011 01:18:46

Hi Altren,

nice to see you here! Thanks for your helping offer :D

Related to the changes of mstoyke -- I invated him to this discussion. :wink:

I can't "just release" binary build, because there are different versions ...
I think most important are binaries for the current version (1.7.1) of Mogre (official source) with VS2010. Secondary is Mogre 1.7.1 + VS2008.
To create binary packs can be our own community task - if we know how to build it successfully. Let's try ...

amirabiri

20-01-2011 13:54:59

I can't "just release" binary build, because there are different versions of Visual Studio/Ogre/MOgre/MyGUI and of course different users need different combinations. Even if we can choose one set of libs versions there is still differens versions of Visual Studion (2005/2008/2010) and there is no way for me to make binaries for each.
I understand that but it's common practice to target the most common environment as that solves the problem for 90% of users.

I think you can safely ignore VS 2005 and 64bit systems (as Mogre doesn't currently work on 64bit anyway). Also your binary release should follow the most recent version of Mogre, again this would cover most users.
So basically if you provided binary releases for:

Beauty

20-01-2011 17:42:01

Mogre doesn't currently work on 64bit anyway
Mogre does work on 64 bit systems. Only for compilation you need to target x86 :mrgreen:

mstoyke

20-01-2011 21:09:29

Hello everybody,

I'll try to create a diff file with all the changes I made and post a link to download them here. All code changes can indeed be found in the repository that I released, but I'm not sure if I kept the change history in place. So I will just use the unchanged MyGUI code revision that I based my changes on and diff them against my changed version.

As far as I remember the changes I made very mainly in the Gui Manager wrapper class. It was a manually coded file, not a generated one when I last used it, so I don't know if that has changed lately.

I should be able to prepare the diffs this weekend, so if you need something else from me, feel free to tell me (here) and I will see what I can do on saturday.

Btw, if I'm not mistaken, I also released some example code in the enginedeps repository to show how to use the code and how to initialize MyGUI with my changes.

amirabiri

21-01-2011 00:18:36

Mogre doesn't currently work on 64bit anyway
Mogre does work on 64 bit systems. Only for compilation you need to target x86 :mrgreen:

Yes but what I mean is that there is no need to compile MyGUI managed for Mogre 64bit.

mstoyke

10-02-2011 00:15:04

A little bit later than expected, here are my changes that I used to make MyGui usable for Mogre. The patch that you can download here is based on MyGui SVN revision 3006. I don't know if it is still useful with current versions, as the current revision is 4000+ :)

As a note to most Mogre users: This patch is only useful for MyGui developers or people who still want to use the (very old) Rev 3006 version of MyGui. So don't bother downloading it, if this does not apply to you.

BobbyFischer

10-03-2011 11:25:29

Hm, so are there any plans to release MyGUI binaries for Mogre1.7/Net4 ? :?

Beauty

11-03-2011 19:35:34

Altren, did you have a look to the modifications of mstoyke?
If yes, what do you think about?
Did you add some/all to your official .NET wrapper?

Altren

14-03-2011 21:11:01

Most of similar modifications was made earlier or looks not really useful, may be we'll add some of those modifications though.

We are working hard on 3.2.0 release and we have plans to release binaries for Mogre 1.7.1 built with Visual Studio 2010 with it. I'm still not sure about SP1 - it was released already, but Mogre built without it, right?

BobbyFischer

15-03-2011 21:22:43

We are working hard on 3.2.0 release and we have plans to release binaries for Mogre 1.7.1 built with Visual Studio 2010 with it.

Cool, looking forward to that :D

Beauty

15-03-2011 23:59:10

I can't tell you if Mogre was build with SP1 or not.
The latest Mogre binaries were uploaded on July 2010 (here). So I suppose it's not using SP1.

Is this important for usage of precompiled binaries?
I don't know this detail, but this could be very interesting for Mogre and it's add-ons.
If there is a problem with interaction of mixed binaries (with/without SP1) then the Mogre and add-on developers should know this fact.

If compilation with SP1 is important, I would tell it the related maintainers.

Altren

17-03-2011 21:26:10

SP1 was released less than two weeks ago, so I'm sure Mogre was built without it :)
I'm not really sure about C#, but with C++ libraries and Ogre's SDK and precompiled dependencies it was very important, i.e. it wasn't working in most cases.

I installed SP1 and now I wonder what should I do. Looks like I need to remove it and install Visual Studio without SP1 (also not sure if it is still available on Microsoft website, because they usually integrate service packs :/) or wait for Mogre built with SP1... and that's why I don't like releasing precompiled stuff - there are always troubles with different IDE versions.

Beauty

17-03-2011 21:48:37

Good news for building Mogre:
User amirabiri currently develops a tool which build Mogre mostly automatically.
Look to this topic for details: Mogre.Builder - a tool for easy, automatic build of Mogre

It seems so that using precompiled binaries can cause trouble.
And if somebody doesn't know the reason, he can hunt the source of the problem with less chance to find it out ...

It's a good mention.
So I will tell it to Mogre and add-on developers, that they should at least add a compilation note.
Also I want to add a note on a famous place. (Maybe at the "MOGRE" wiki page?)

Maybe this is a good point for learning how to compile (inclusive solving conflicts!)