wxOgreMVC open sourced
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
wxOgreMVC open sourced
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:
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
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.
The result is wxOgreMVC, and I've chose the MIT license for maximum flexibility. Here's the obligatory screenshot:
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
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.
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
-
- Greenskin
- Posts: 118
- Joined: Tue Feb 19, 2008 1:01 pm
-
- Halfling
- Posts: 79
- Joined: Fri Mar 31, 2006 7:51 pm
- Location: Linz, Austria
Wow that looks very useful! Thanks a lot.
http://www.boost.org/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.
-
- Greenskin
- Posts: 118
- Joined: Tue Feb 19, 2008 1:01 pm
- syd
- Gnome
- Posts: 362
- Joined: Thu May 01, 2008 1:55 am
- Location: Paris, France
I was going to ask the same question =)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.
same problem here. I was wondering if my sdk version is too old. but could not figure out how to retreive the version...
- Jabberwocky
- OGRE Moderator
- Posts: 2819
- Joined: Mon Mar 05, 2007 11:17 pm
- Location: Canada
- x 218
- Contact:
-
- Gnoblar
- Posts: 6
- Joined: Mon Apr 04, 2005 12:10 pm
Re: wxOgreMVC open sourced
Thanks, sinbad.
This is what i want.
This is what i want.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
As stated in the Readme.txt:
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.
@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.Dependencies
------------
1) wxWidgets
2) Boost
3) Ogre (Shoggoth or later)
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.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
- detox
- Greenskin
- Posts: 103
- Joined: Thu Sep 07, 2006 1:13 am
- Location: Ohio, USA
- Contact:
- oddrose
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
- Contact:
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Thank you Steve 'Sinbad' Streeting - you're the man!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.
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.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- Kentamanos
- Minaton
- Posts: 980
- Joined: Sat Aug 07, 2004 12:08 am
- Location: Dallas, TX
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
-
- Halfling
- Posts: 85
- Joined: Sun Sep 23, 2007 7:58 pm
Ak, so I half write my editor, and then this comes along. Typical
Now I have to go and steal all the code, rewrite half my editor, realize my code is **** and start again.
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.
Now I have to go and steal all the code, rewrite half my editor, realize my code is **** and start again.
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.
- syd
- Gnome
- Posts: 362
- Joined: Thu May 01, 2008 1:55 am
- Location: Paris, France
a little issue here
there is a xformpanel.fbp, but not xformpanel.xrc
Code: Select all
XRC ressource 'xformPanel' (class 'wxPanel') not found!
-
- Kobold
- Posts: 25
- Joined: Thu Mar 29, 2007 6:50 pm
That file is a Form Builder project file. You can use wxFormBuilder to generate the xrc file.
-
- Gnoblar
- Posts: 1
- Joined: Fri May 09, 2008 10:34 pm
Very good work sinbad , 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.
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.
-
- Greenskin
- Posts: 118
- Joined: Tue Feb 19, 2008 1:01 pm