What does QuickGUI uses?
QuickGUI uses ogre's overlay for rendering or Quads?
QuickGUI uses the render system directly for drawing to the screen. Every widget:
- is a window, OR
- belongs to a window
Each window is a texture. I use Vertex Buffers to define the quads representing each window, and send that to the Render System. Each window has its own texture, and vertices can only be batched according to their texture, so each window is its own batch. When a window or widget belonging to a window needs to be redrawn, the texture for the window is updated. In this way, large windows may take more CPU to generate the new texture. With this in mind, performance is based on how you use the lib. For Users who want the best performance, they will have to find an acceptable balance between number of Windows and the sizes of each Window.
This sounds like it's related to my problem... Basically I'm putting together some libraries and stuff for a game, and the test I have drops from 70ish fps with just the default empty QuickGUI sheet, to 40 or so with a new sheet that has a single button on it, with a quit() function mapped to mouse button down. I can toggle between sheets with a button while it's running and that makes no difference, so I suspect it must be CPU related. The test involves a few hundred physically simulated objects and I haven't put in any multithreading.
Any ideas how I could improve performance? Because seriously, one button... I don't think it should do that. This occurs with both the opengl and d3d renderers.
I did have to do a few modifications to get it to work with ogre 1.6, things like Ogre::vector<type>::type *whatever to std::vector<type> * (I think that was it...) but that shouldn't change much.
With texture caching, the textures only need to be updated when something has changed. This can cause high cpu usage if you have a full screen window (ie Sheet) that changes a lot, for example mousing over the button. I would recommend using a small window to contain the button, so that when you hover over the button and its appearance changes, its only the small window's texture that needs to be updated, and not a 1600x1200 (for example) full screen window texture that needs to be redrawn to texture.
As for preformance with default sheet, the only thing QuickGUI is doing at this point is rendering the mouse cursor every frame. I can't see how rendering a small quad to the screen would impact FPS significantly.
If only the default sheet is present it works fine, the issue is when something else is there, whether it's on the active sheet or not :S I'll try putting the button in a smaller window and see if that helps.