Mogre 0.2.2 Released! (Ogre 1.4.3)

bleubleu

12-07-2007 16:28:10

Hi there!

I got tired of bossing Pelle around, so I upgrate Mogre to Ogre 1.4.3! Besides the bug fixes included in 1.4.3, here are the Mogre-related changes :
  1. All "internal" visiblities are now "public protected". This means that you can now inherit from a Mogre object in a CLI/C++ application. (See thread http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4058)
    [/*:m]
  2. Profiler class in now included.(See thread http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4044).
    [/*:m]
  3. Mogre.pdb is included.
    [/*:m]
  4. Mogre include files are included instead of the regular Ogre ones.[/*:m][/list:u]Again, no installer. I was missing some UNIX tools like bash to complete the job. Compiled with VS2005 SP1 and December 2004 DirectX SDK for max compatibility.

    Get it here : http://www-etud.iro.umontreal.ca/~gauth ... gre022.zip

    This is my first build, i hope i didnt f*ckup. I will send the patch (or modified files) to Pelle tonight or tomorrow or some other admin so they can update the SVN. I would be nice to have it up on the wiki aswell.

    So far, everything seems to hold. I've been able to run the examples, compile PLSM2, use MogreNewt, embed Ogre windows inside a .NET Form, etc.

    Mat

smernesto

12-07-2007 22:30:55

Excellent News. I will try it.

But, what about an official release, I mean, we need some organization for test and release one official Mogre. If we can get only one release per version then we don´t need to test several mogre releases and the questions in the forum will be about one release that all people uses.

Well, I will try it and post later.

Ernesto

bleubleu

12-07-2007 22:40:37

I'm totally with you on that.

But that fact of the matter is, Bekas is not there to build the "official" releases. But dont worry, everything will be committed to the SVN.

As far as I know, before leaving for the army, Bekas did not have time to find any maintainer nor write a complete build procedure for Mogre.

Until he returns for good, things may be a little shaky. I'm going to do my best with the other guys like Pelle and German to keep the think updated. It's either that, or the project might die as it often happens when an open source project is a one-man-show.

Mat

smernesto

13-07-2007 04:13:00

Yes, all of you are really doing a god job for maintain Mogre alive.

Mogre is very useful for me, and maybe for many people :D .
I am currently doing my degree project for my university using Mogre.

Thanks

Ernesto

pin

14-07-2007 09:29:23

gj Mat. The 0.2 release still works for me though

pjohnsen

15-07-2007 10:46:39

Hi,

First of all thanks to Mat for getting the 0.2.2 build done :)

I have committed the changes to SVN and made a MOGRE-0.2.2 tag.

I also managed to build an installer which I have uploaded to source forge: http://downloads.sourceforge.net/mogre/Mogre0.2.2-OgreSDKSetup1.4.3_VC80.exe. It now also includes the Newton samples.

I guess this is as close as we can get to an "official" release right now. If there are no major problems with the installer I'll try to figure out if we can update the link on the main Mogre wiki page.

-Pelle

bleubleu

15-07-2007 16:29:41

Weeeeeeeee! You rock man!

Mat

pin

15-07-2007 18:44:22

Hi,
I guess this is as close as we can get to an "official" release right now. If there are no major problems with the installer I'll try to figure out if we can update the link on the main Mogre wiki page.


Maybe it would be a good idea to keep the link to the old release (0.2) too in case someone still wants to use it (or the new release turns with issues).

Auphim

15-07-2007 20:49:41

Hi,

congratulations to all of you!!

With this new version, its seems Mogre has some support for inheritance.
But, how complex will be to have full inheritance??.

I mean, some functions can´t be overrided, just because their are not marked as virtual.

For instance, I can't compile this dummy code:

public class MyTriangle : ManualObject
{
public MyTriangle(string name) : base(name)
{
}

public override void Clear()
{
base.Clear();
}
}


The original clear() is virtual, but it is not longer in the Mogre version.

It is just a silly example, but I'm sure there are more interesting situations.

pin

20-07-2007 20:18:37

Hey guys thanks for keeping the Mogre 0.2 download link in the wiki =]

smernesto

21-07-2007 03:51:57

Hi.

Can you upload a source package to the downloads section of the sourceforge project please?

Thanks

Ernesto

pjohnsen

21-07-2007 07:58:40

I have never used any of the source packages myself before, so I don't really know what goes into the source package and would have to figure that out first :(

If you need the source I would much prefer if you just checked it out from SVN.

-Pelle

smernesto

21-07-2007 19:03:27

I didn´t find the auto classes in the svn.

Well is not very important but sometimes when debugging I want to use the source code of mogre also.

Thanks

Ernesto

pjohnsen

21-07-2007 19:20:47

If you need the auto-generated classes, just run build.bat in Mogre/cpp2java and then build and run Mogre/AutoWrap.

I think you need to have Java installed in order to run cpp2java.

Hope this helps,

-Pelle

Kerion

23-07-2007 16:42:02

Thanks for this guys. I had tried to take up this mantle myself, to keep MOGRE alive while Bekus was gone, but I frankly just don't have the time. I have so much going on with other projects I am writing, it's just not working out for me. Thanks for this though. I am going to update Mango to use this tonight and see how it goes.

Bekas

01-08-2007 14:29:40

But, how complex will be to have full inheritance??.

I mean, some functions can´t be overrided, just because their are not marked as virtual.

It's not that simple. Just by changing a method to virtual you'll be able to override it on the .NET side (when you call it from your code) but native Ogre will not be aware of the overriding method.

I have never used any of the source packages myself before, so I don't really know what goes into the source package and would have to figure that out first
The source packages contain the SVN source + autogenerated files, so that it's easy for someone to build Mogre without dealing with the autowrapper.


Thanks a lot for updating Mogre to Ogre 1.4.3! If the installer works fine, notify sinbad so that he can update the link in SDK download links of the main site.

Kodachi_Garou

07-08-2007 20:33:26

Hi,

I've tried an interesting, yet a bit gruesome and unpractical, technique to override native class methods in .NET. Maybe it can't be applied directly to all possible cases, but here goes:

Consider you have native class MyClass, defined as:

class A
{
public:
virtual bool update();
virtual void setDirection(const Vector3 &val);
}


In order to have .NET classes override A, you can create a pure native class CallbackA, defined as:

CallbackA
{
private:
bool (*update_fn)();
void (*setDirection_fn)(const Vector3 &);
public:
CallbackA(bool (*update_fn)(), void (*setDirection_fn)(const Vector3 &);
virtual bool update();
virtual void setDirection(const Vector3 &val);
}


This class overrides all methods in A and solves them by means of pointers to functions passed in its constructor. With this class in place, you can then define a .NET C++ class:

ManagedA
{
private:
CallbackA *callback_impl;

[UnmanagedFunctionPointer(CallingConvention::Cdecl)]
delegate bool UpdateMethod();
bool UpdateMethodStub()
{
return Update();
}

[UnmanagedFunctionPointer(CallingConvention::Cdecl)]
delegate void SetDirectionMethod(const Vector3 &val);
void SetDirectionMethodStub(const Vector3 &val)
{
SetDirection(val);
}
public:
ManagedA()
{
// Create delegates to each virtual function
// e.g. updateMethod = gcnew UpdateMethod(update);

// Marshal delegates as pointers to functions
// e.g. void* update_ptr = Marshal::GetFunctionPointerForDelegate(updateMethod).ToPointer();

callback_impl = new CallbackA(update_ptr, setDirection_ptr);
}

virtual bool Update();
virtual void SetDirection(Mogre::Vector3 val);
}


This last class is a bit gruesome, but here's the deal. The .NET base class contains an instance of the CallbackA native class, and provides it with function pointers to solve the overrides, i.e. stubs which are marshalled as pointers to functions which are then responsible for calling the real .NET methods.

Deriving from ManagedA after this black-magic becomes trivial. Just override like always and voila. I've tried this for my managed wrapper to the Caelum sky system for ogre and it works charms.

However, this IS still gruesome and unpractical and probably would best be done through automatic code generation.

Best regards,

Gonçalo

KidOfTheNeon

05-10-2007 07:48:46

Could you explain how to create custom scene managers with this library?

I have a problem with derived constructor - it takes CLRObject* as parameter, whereas OGRE SceneManager constructor takes only instance name.

Also I can't override _findVisibleObjects method...