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!
Preformance / Optimisations
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
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.
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.
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....
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.
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....
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.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests