Task: Add Mogre core improvements of Manski to repository


18-01-2012 10:45:23

Many months ago user Manski added improvements (inkluding reverse engineered wrapper documentation) to the core code of Mogre.
Unfortunately he didn't add it to the official Mogre repository (here).
Now he doesn't have time for Mogre work anymore.

It would be very sad if his good work would get lost.
Here is the private repository which contains his code.

Well, that's my task for our community.

Who has the knowledge how to merge code of mercurial repositories?
If somebody needs write access to our Mogre repository, write me a PM with our e-mail address.


18-01-2012 16:12:45

I asked Manski to follow this topic and he agreed.
If you have specific questions related to his improvements, just ask here.


19-01-2012 09:46:01

I guess the first question is, what are the improvements?


19-01-2012 11:30:46

Ok, now I searched in old topics for details.
Here are important notes about the improvements. (grabbed from this topic)

I'm currently refractoring and documenting the whole AutoWrap code (which is quite hard as there's virtually no documentation at all in the code nor elsewhere). Perhaps this then could be used as starting point for creating a PInvoke wrapper but there's still a long way to go. You can check on the progress here:

http://bitbucket.org/manski/mymogre/ (branch: autowrap-dev)


This is the first detailed documentation for the wrapping process.
Maybe the wiki would be a better place (e.g. for markup, overview, spontaneous correction edits), but this possibly could be done later.
On the other hand a redundant description could be bad to maintain.
Well, we will see.
Best is to HAVE such a documentation. Thanks !!

The wrapper documentation is a little bit hidden. Here are the direct links:
http://bitbucket.org/manski/mymogre/src/tip/build.txt (main doku)
http://bitbucket.org/manski/mymogre/src/tip/Codegen/AutoWrap/readme.txt (main doku)
http://bitbucket.org/manski/mymogre/src/tip/Codegen/cpp2java/readme.txt (tiny notes)
http://bitbucket.org/manski/mymogre/src/tip/Codegen/mogre_xml/readme.txt (tiny notes)

A remark of Bekas (the father/creator of the Mogre project) related to Manskis improvements:
I took a look at manski's modifications to the generator and they were great!

Hey guys,

I'm glad you like the changes I made to the AutoWrap code (and I'm even more glad that the original author likes them, too). :D


Regarding merging the code into the official repository: There are some changes that you should be aware of:
  1. I've slightly changed the UI so screenshots and tutorials need to be updated.[/*:m]
  2. I've reformatted some files of AutoWrap's code with my own styleguide. So some files are still in Bekas' style and some in mine. Sorry about that but Visual Studio is simply a horrible IDE (in some places) and doesn't allow me to specify a code style on a per-project- or per-solution-basis.[/*:m]
  3. Currently the generated code will use two spaces instead of one tab for indention (I'm not a big fan of tabs as everyone has different tab widths) and use Windows line endings (instead of Linux line endings), though this is configurable.[/*:m]
  4. The biggest changes (so far) is that my AutoWrap implementation creates set accessors for boolean property (where the old implementation create set methods). You can find the change to the code in changeset f24fcc3ed3fc. This is change is important as it breaks backward compatibility. I did this code change, as IMHO the code now does the correct thing.[/*:m][/list:u]

what's a native director??
If I remember correctly, this is for creating managed classes that can "override" the methods of a native class (if you override a virtual method from the managed class it gets called by the native object).

2-step linking process (build OgreMain with LINK_TO_MOGRE 0, then Mogre, then OgreMain again)


19-01-2012 11:52:33

I found more in the Mogre development thread.

I've been working on my MOGRE environment and while doing so, I've updated AutoWrap's GUI and added a readme with some explanations about how to use AutoWrap and "Attributes.xml". You can find the updated source in my Hg repository:


It would be nice if they could be integrated in the official repository.

I saw that you checked in the auto-generated code for the wrapper in your repository, like I did in my old repository. That's a good example for commits that can help in a development branch to build Mogre with less pains, but these commit don't need to be in the main repository where only the necessary files should be committed that are not automatically created by following the build instructions.

I've seen repositories grow by as much as 80-100 MB a week because they contained compiled binaries. That's something I don't want to see happen in our repository.
Note to the last quote:
Mstoyke means binary files which are generated by Visual Studio automatically. Binaries of depencies are "allowed" in the repository. They don't change so often, so it's no big problem to the size. Also it simplifies the build process (because you don't need to build the depencies, too).
Well, this is just my personal remark. Perhaps I'm wrong, because don't know much about the autowrapper and core code internals.


19-01-2012 11:57:49

@ manski
In an other topic I found an appreciation to your efforts:

http://bitbucket.org/manski/mymogre/src/tip/build.txt (main doku)
http://bitbucket.org/manski/mymogre/src ... readme.txt (main doku)
http://bitbucket.org/manski/mymogre/src ... readme.txt (tiny notes)
http://bitbucket.org/manski/mymogre/src ... readme.txt (tiny notes)

This is probably the most useful Mogre ressource I have ever read. Thanks a lot