Preformance / Optimisations

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

MacMan45
Just popping in
Just popping in
Posts: 19
Joined: Mon Apr 24, 2006 10:33

Preformance / Optimisations

Postby MacMan45 » Mon Jul 17, 2006 05:24

I'm trying to use CEGUI in a hooked application.

I have hooked the game well enough & can load a window overtop without an hassle.

My problem comes down to one of speed.

When in the menus of this game, everything is smooth, but inside the 3D game world, the game becomes unplayable.

At first i thought this was caused by some SetRenderState conflict, but i finally installed fraps & found that the only reason the menu is smooth at the start, is because it begins at 150 fps & drops to about 70 (with CEGUI on), so its never noticeable.

In the game however, my old video card only gets 20 fps & once i enable CEGUI to render, it drops to below 1 fps.


So my question, before i jump ship looking for a different library...

Is there anyway i can trim down the renderGUI step?
Would it be viable to maybe hack away at the direct x renderer & remove parts (give up functionallity for speed)?


I would really rather not switch to another library, or (ugh) write my own, i use CEGUI for a lot of things & i'm very comfortable with it.
Any help would be apreciated!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Jul 17, 2006 19:14

There is no magic solution. You may however hack away and see what you can achieve :)

We (the CEGUI devs) have spoken briefly about optimisation recently, and will be spending some time working in this area after the 0.5.0 final release; though obviously this does not help you now.

The best I will advise is to try and minimise the number of quads you are drawing. Also, drawing lots of layers of widgets with text will be expensive.

Not much more to say on this subject at the moment.

CE.

MacMan45
Just popping in
Just popping in
Posts: 19
Joined: Mon Apr 24, 2006 10:33

Postby MacMan45 » Tue Jul 18, 2006 03:35

thanks, i have been probing deeper & i'm starting to wonder if CEGUI is actually my direct problem.

I worked out the numbers & the simple gui i'm rendering is taking 6.6ms per frame to draw (when in the hooked game's menus).

If it behaved the same way once in a 3D world, i should only be seeing about 3~4 fps drop on my original 20.


All i need to do now is discover why the hell the game loop almost comes to a stop when i call renderGUI.... :lol:


On that note, is there anything the GUI does which might hinder a 3D scene that it wouldn't on a 2D one?

I'm not that well versed in 3D hardware, but does it flush buffers or maybe force video ram to be paged? (i find that one unlikely, i have 256mb or ram)

Would it cause any pipeline stalls or something?
Any hints or ideas on where to look, would be greatly apreciated.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests