wxOgreMVC open sourced

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

wxOgreMVC open sourced

Post by sinbad »

Last year I was creating an Ogre-based GUI tool, and as part of that I created a wxWidgets-based framework for it to live in. That tool hit a brick wall in terms of both funding, and some significant technical hurdles and as such it's shelved for the moment until I can figure those things out. However, since a number of people have asked for good wxWidgets examples I spent some time this weekend extracting the common elements so that I could release them as open source.

The result is wxOgreMVC, and I've chose the MIT license for maximum flexibility. Here's the obligatory screenshot:

Image

As suggested by the name, the framework adheres to the Model View Controller (MVC) pattern of GUI software design. View components display the user interface, controller components receive user input and route it appropriately, and Model components store the persistent data. Controllers are switchable depending on what tool is currently selected, nicely handling variant behaviour.

There are several things this framework implements:

1) A multi-window system with embedded Ogre rendering
2) A typical 3D modeller style 4-pane setup with 'cross' splitter control and the ability to maximise a single window
3) Camera controls - FPS and 'focussed' (orbit) mode
4) An event system communicating changes to the model to other subsystems in a loosely coupled manner
5) A single click and rubber-band selection system
6) A generic property system
7) A simple model implementation
8) Examples of doing selection display and different view modes (wire, hidden line, textured)

When using this framework you will undoubtedly want to expand the model and probably the controller system to meet your applications needs. Note that a bunch of the panels and controls in the GUI example are non-functioning in this version, such as a the transform panel and most of the main toolbar - they're there as placeholders only to show you the kind of thing you might do.

I've only tested this on MSVC++ 2005 and Windows so far. Both the D3D9 and GL rendersystems are usable though. There are a couple of known issues, see the ReadMe for details, but overall it's pretty solid.

I hope this is useful to someone. I'm not actively developing it right now so don't expect any enhancements or anything, I'm just putting it out there as a starting point for anyone who might want to use it - nevertheless there's quite a few weeks of effort in this so it's a pretty solid base.

You can get it from the OgreAddons repository.
Last edited by sinbad on Tue May 06, 2008 5:28 pm, edited 1 time in total.
User avatar
triton
Greenskin
Posts: 138
Joined: Thu Mar 13, 2008 10:25 pm
Location: Portugal

Post by triton »

It looks really nice and polished. Thanks for releasing this.
User avatar
Jallen
Halfling
Posts: 61
Joined: Sat Dec 29, 2007 8:34 pm

Post by Jallen »

Looks pretty awesome.
It will hopefully mean people will start using something like this rather than CEGUI for things like editors. I know i will be trying it out.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5382
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1313
Contact:

Post by dark_sylinc »

Thanks Sinbad!
This indeed looks pretty useful. :)

Pretty cool

Cheers and keep up the good work
Dark Sylinc
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

Thanks!
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Post by Brainshack »

Thanks Sinbad. I checked out the stuff from SVN but im missing a dependency called "boost"

#include <boost/signal.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>

what is this for and where do i get em?#

Thx in advance.
Image
Estrich
Halfling
Posts: 79
Joined: Fri Mar 31, 2006 7:51 pm
Location: Linz, Austria

Post by Estrich »

Wow that looks very useful! Thanks a lot.
Brainshack wrote:Thanks Sinbad. I checked out the stuff from SVN but im missing a dependency called "boost"

#include <boost/signal.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>

what is this for and where do i get em?#

Thx in advance.
http://www.boost.org/
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Post by Brainshack »

Hmmm May it be possible that this only works with the newest trunk version or something like this? I installed boost now and fixed the problems regarding it but now i get failures like:

'BOX_NULL': Is no Element of 'Ogre::AxisAlignedBox'

I'm using Ogre SDK and not a self build version from SVN.
Image
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

Brainshack wrote:Hmmm May it be possible that this only works with the newest trunk version or something like this? I installed boost now and fixed the problems regarding it but now i get failures like:

'BOX_NULL': Is no Element of 'Ogre::AxisAlignedBox'

I'm using Ogre SDK and not a self build version from SVN.
I was going to ask the same question =)
same problem here. I was wondering if my sdk version is too old. but could not figure out how to retreive the version...
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Post by Jabberwocky »

Neat. Looks like a great starting point for new tool development.

What was the original intention - a level editor / worldbuilder?
Image
hsl9999
Gnoblar
Posts: 6
Joined: Mon Apr 04, 2005 12:10 pm

Re: wxOgreMVC open sourced

Post by hsl9999 »

Thanks, sinbad.
This is what i want.
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

Ok, the latest sources made it work.

Sinbad, a big thanks, I was working on the exact same things, and this saves a lot of time.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

As stated in the Readme.txt:
Dependencies
------------
1) wxWidgets
2) Boost
3) Ogre (Shoggoth or later)
@Jabberwocky: I had what I believed to be a pretty radical idea for level building, this was the GUI framework I needed to build it on. I hit a few technical issues which were related to the level of ambition that I had for the tool (and it's unproven - AFAIK no-one has done an editor quite like this before), to the extent that I wasn't sure I could make it work the way I envisaged. Before I knew it I'd burned through all the time (== money) I had assigned to my pilot and thus had to take a more hard-headed look at the project, and the conclusion was I probably wasn't going to be able to make my money back on it, given the market available and the amount of time it might take to take it to conclusion (if it ended up working), so I've had to shelve it for now. I still think the idea is very interesting but it will have to wait until I have more money to spend (or spare time) on developing it properly. I'm keeping the idea to myself for now in the hope I eventually can.

I did find that I burned through a lot of time just coming up with this basic GUI framework, before I even got on to the exciting bits. That's why I decided to release it - it's really not that difficult but it's time consuming to do it right. There's no point someone else going through the exact same process as I did - if this helps someone else skip the dull steps and get their ideas going quicker than I could, I'll be happy.
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Thanks a lot for releasing this, the code should serve as a good reference! :D
Creator of QuickGUI!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Wow! Sinbad made a topic in the Showcase forum! ;)

Looks nice, it might prove useful for editors and tools (not that editors aren't tools).
User avatar
detox
Greenskin
Posts: 103
Joined: Thu Sep 07, 2006 1:13 am
Location: Ohio, USA
Contact:

Post by detox »

Wow Sinbad, thank you. This should give anyone attempting to build specialized tools a solid boost.
User avatar
oddrose
Orc
Posts: 470
Joined: Thu Feb 15, 2007 2:08 pm
Location: Gothenburg, Sweden
Contact:

Post by oddrose »

Great! From all angles. This gives a huge head start in editor development.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

sinbad wrote:- it's really not that difficult but it's time consuming to do it right. There's no point someone else going through the exact same process as I did - if this helps someone else skip the dull steps and get their ideas going quicker than I could, I'll be happy.
Thank you Steve 'Sinbad' Streeting - you're the man! :D

Perfect timing for me, as I have been searching all over for a usable wxOgre solution for an editor. To get me into Ogre programming again.
You just saved me a lot of work! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

OT: jacmoe lives! :)

This is cool and it will be something I play with soon
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

OT: jacmoe lives!
:shock: :D
Creator of QuickGUI!
Yacoby
Halfling
Posts: 85
Joined: Sun Sep 23, 2007 7:58 pm

Post by Yacoby »

Ak, so I half write my editor, and then this comes along. Typical :roll:

Now I have to go and steal all the code, rewrite half my editor, realize my code is **** and start again.

:P




Great work, I shall enjoy looking at the code and seeing how I can improve my editor. Maybe one day I will write the game that goes with my editor. Yeah right.
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Post by syd »

a little issue here

Code: Select all

XRC ressource 'xformPanel' (class 'wxPanel') not found!
there is a xformpanel.fbp, but not xformpanel.xrc
serkanergun
Kobold
Posts: 25
Joined: Thu Mar 29, 2007 6:50 pm

Post by serkanergun »

That file is a Form Builder project file. You can use wxFormBuilder to generate the xrc file.
manbearpig
Gnoblar
Posts: 1
Joined: Fri May 09, 2008 10:34 pm

Post by manbearpig »

Very good work sinbad :D , it 's a very interesting piece of code for people who want to make an editor, but i have some problems during compilations :?


BOX_NULL' : is not a member of 'Ogre::AxisAlignedBox
getUserAny' : is not a member of 'Ogre::Renderable'
Visitor' : base class undefined
setOrthoWindow' : is not a member of 'Ogre::Camera'
and so on ...


looks like i don't use the right Ogre version? Currently i use the svn version.
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Post by Brainshack »

Think you should switch to trunk.
Image
Post Reply