XNA + mOgre

galaktor

04-11-2008 22:47:51

I was wondering if there are any clean concepts for integrating (m)Ogre into XNA 3. I thought about implementing a GraphicsManager, which implements Xna.Framework.IGraphicsDeviceManager and then calling it from within the main loop. But I am not all too familiar with XNA (yet) and was wondering if anybody has a better idea to integrate OGRE into XNA more seamlessly.

Frozenlogic

12-11-2008 17:12:20

Why would you need to integrate Ogre into XNA?

galaktor

14-11-2008 21:15:51

Well, first of all, I like Ogre. Second, the XNA Framework is just that, a framework, and it does not offer such a well designed graphics engine like Ogre.

Anyway, I will not be using XNA anymore, instead I'm implementing my own game engine, so I can also integrate Ogre how I like to.

Still, I was just wondering if anybody else has done something like that and if there would be a clean way to implement some interface and use Ogre like a native XNA module (e.g. GraphicsDevice).

AndroidAdam

15-11-2008 00:42:11

Ogre is a stand alone engine, it doesn't need to be integrated into anything. Although, this XNA thing brings me some ideas. Things such as using the content pipeline would be nice.

galaktor

15-11-2008 01:20:15

Of course, I know that Ogre is an engine. I mean integration as in architectural design. Ogre it is still "just" a render engine and therefore is only a part of a larger application, meaning the game itself. And - as you said - since XNA offers some nice features and also is a framework that offers intefaces to implement various components by yourself, there should be a way to use XNA interfaces to encapsulate Mogre in a clean way. At least I suppose so :-)

I know of the interfaces "IGameComponant" and "IDrawableGameComponent", but these are a bit to general. Then there is "IGraphicsDeviceManager", but that demands at some point that an actual instance of "Xna.GraphicsDevice" is returned, which I do not have of course, since I am using Ogre.

Probably the answer to my question is simply "no". I was hoping someone already had considered this before me.

AndroidAdam

15-11-2008 02:20:48

No, you should go the other way around. Rather than integrating ogre into something, try integrating something into OGRE.

For example, if I wanted OGRE to be able to play sound, I wouldn't try to integrate it into XNA to use it's sound, I would just include a sound library as a part of OGRE and be able to use inside of OGRE itself.

With a good deal of work, and changing OGRE's source, I'm sure this could be phased into XNA seamlessly. It would mean things like being able to port to 360. A very interesting idea, but as OGRE can handle itself, I don't think worth the time.

galaktor

15-11-2008 13:57:44

Hm, I do not like the idea of using Ogre as my games main engine. It is no problem to generally integrate Ogre into some game (RenderOneFrame). But I feel like it is bad design to use Ogre as the core for my game. Probably this is just a question of taste.

I am also not considering any changs to the Ogre source. Just using XNA design principles to use Ogre for my graphics. Using Ogre on Xbox would be another aspect, but I am talking about Windows for the moment.