From my experience with building my own GUI, I think a lot of developer time could be saved with a few small tweaks to the panel/overlay/element system in the OGRE engine (as they are quite handy actually).
1. Inheritance and Polymorphism could be better as, at the moment a lot of very messy casts are required to create new objects, and I also find myself having to keep hold of pointers to each of the different casts from the same object to perform different functions, which is a bit messy also.
2. The ability to copy Overlays loaded from the .overlay files. To build my different widgets I had to write a whole lot of code. It would have been much quicker if I could just duplicate and modify a generic widget defined in a .overlay file. At the moment this is very hard to do, mainly due to unique name clashes.
With both of these improvements, you could knock together a custom GUI in about 2 hours, with hardly any code, and all visual adjustments made without the need to recompile. (Therefore almost eliminating the need to use a GUI library altogether).
Hope that helps!
Clean Up OO of Overlays, Elements, Panels
- AntonTheManton
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Clean Up OO of Overlays, Elements, Panels
Last edited by AntonTheManton on Wed Dec 19, 2007 9:45 am, edited 1 time in total.
- xavier
- OGRE Retired Moderator

- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
- AntonTheManton
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Hit Testing
I've used OGRE Overlays with Hit Testing in my project. It's only a couple of lines of code. I found making a GUI based on the OGRE overlays quite easy (I'm sure that's what they were built for), but it could be even easier for other developers wanting to do the same thing if they were a bit tidier and you could copy them.

(sorry, not sure why that image doesn't display but the url works)

(sorry, not sure why that image doesn't display but the url works)
- syedhs
- Silver Sponsor

- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
Well I am of the opinion that the Ogre's Overlay is actually meant for prototype and quick GUI (not QuickGUI
) because of inefficient batching number and a few others eg no direct way to hide/show certain overlays in one viewport.
In other words, it is better to have a separate GUI library for some serious GUI uses.
In a slight OT tone, my vote is to for the overlay to be separated from Ogre core and implemented as addon or something like that.
In other words, it is better to have a separate GUI library for some serious GUI uses.
In a slight OT tone, my vote is to for the overlay to be separated from Ogre core and implemented as addon or something like that.
- xavier
- OGRE Retired Moderator

- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
- AntonTheManton
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Quick and Dirty
Ah OK, thanks for that information. In that case I I'll back off my GUI development so that I don't become too dependent on the Overlays.
This could be a good excuse to build that fully 3D GUI that I've always wanted...
This could be a good excuse to build that fully 3D GUI that I've always wanted...
