Overlay Optimization?

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Overlay Optimization?

Post by KungFooMasta »

It came to my attention that the use of OverlayElements, OverlayContainers, and Overlays in general produce a lot of batching.

It seems like every PanelOverlayElement I use raises the batch count by 1. Is there any way we can reduce this?

Thanks for any help.

KungFooMasta
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Don't use overlays? They are not good for much other than development and debugging.

I am guessing that this came up as a result of the QuickGUI post in the addons forum -- I wasn't aware you are basing that on Overlays -- that's not such a good idea.

There is a reason that UI systems render directly to quads themselves, so they have control over how they do what they do.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
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 »

That's not good news! :P

Other than this batching issue, I see the Ogre Overlay system as being very powerful and capable of fulfilling GUI needs. Instead of acknowledging that the Overlay system has limitations, we should try to make it better! Then again, it would probably have low priority for most developers. :(

I supposed I could look into quads when I have more free time.. Overlay's seem like a great thing, they just need some tweaking. Aren't there a lot of showcase projects that use Overlays as GUI elements of the game?
User avatar
Frenetic
Bugbear
Posts: 806
Joined: Fri Feb 03, 2006 7:08 am

Post by Frenetic »

I always found it easier to just do all the quad rendering stuff myself, rather than submit to the details and limitations of Overlays, but that's just me.

Perhaps Overlays should be marked 'deprecated'? :twisted:
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

KungFooMasta wrote:That's not good news! :P

Other than this batching issue, I see the Ogre Overlay system as being very powerful and capable of fulfilling GUI needs. Instead of acknowledging that the Overlay system has limitations, we should try to make it better! Then again, it would probably have low priority for most developers. :(

I supposed I could look into quads when I have more free time.. Overlay's seem like a great thing, they just need some tweaking. Aren't there a lot of showcase projects that use Overlays as GUI elements of the game?
No. Most showcase projects that have any interactive UI use something like CEGUI or a homegrown solution. Overlays are best for what they are used for: displaying debug info in debug overlays. As you found out, they are not in the least optimized, and there is no desire on the part of the Team to make them so.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
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 »

Ok, got it. :)

Frenetic, sent you a PM with some questions since you seem to have some experience with GUI related stuff. (at least rendering quads on the screen)
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

I've stopped using overlays and now use the Rectangle2D class placed in the overlay render queue. I'm not sure the batching possible there, but you could just make your own custom quads that can be batched together. It is a very simple geometry after all.
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
Post Reply