Hi folks,
Not really a gauges question but more to do with panels. However, I guess this is the most appropriate place in the forum for it...
Setup:
2D panel in FS9 with a 'real' resolution of 3840x1200 pixels. This is scaled in the panel cfg for fullscreen output at 5120x1600. My FS9 and windows are set to this resolution (two monitors in EyeFinity).
The panel has two main layers - the primary one has the background bitmap and most of the gauges. The second has a few gauges - two that must always overlay the primary and don't do so very well using only draw_order statements and one windscreen wiper gauge that makes the PFD flicker if it is in the same panel layer!
Symptom:
On Windows XP and a 3840x1600 pixel dual-screen setup this all worked relatively well. Of course there was an FPS penalty for the panel but it was fairly 'constant'. Moving to Windows7 (but same GFX card and same resolution initially) I started to find that there was an oscillation in the FPS and that the outside scenery would stutter / lag while turning when the panel was in view (of course it might also stutter and lag when not turning, but I would not see it so clearly). The view movement is smooth with the panel hidden. Now more recently moving to larger screens the problem is worse, to the extent that I am trying to work out a way to fix it...
So far, I have tried the following:
Cheers,
Geoff
Not really a gauges question but more to do with panels. However, I guess this is the most appropriate place in the forum for it...
Setup:
2D panel in FS9 with a 'real' resolution of 3840x1200 pixels. This is scaled in the panel cfg for fullscreen output at 5120x1600. My FS9 and windows are set to this resolution (two monitors in EyeFinity).
The panel has two main layers - the primary one has the background bitmap and most of the gauges. The second has a few gauges - two that must always overlay the primary and don't do so very well using only draw_order statements and one windscreen wiper gauge that makes the PFD flicker if it is in the same panel layer!
Symptom:
On Windows XP and a 3840x1600 pixel dual-screen setup this all worked relatively well. Of course there was an FPS penalty for the panel but it was fairly 'constant'. Moving to Windows7 (but same GFX card and same resolution initially) I started to find that there was an oscillation in the FPS and that the outside scenery would stutter / lag while turning when the panel was in view (of course it might also stutter and lag when not turning, but I would not see it so clearly). The view movement is smooth with the panel hidden. Now more recently moving to larger screens the problem is worse, to the extent that I am trying to work out a way to fix it...
So far, I have tried the following:
- Graphics driver: I'm a bit screwed here since with the exception of the AMD Catalyst 12.11.beta6 driver, all available drivers either crash windows with Firefox (ie 12.10 - it's a known bug) or cause awful flickering of any 2D gauges that contain text or overlayed bitmaps (ie most of them).
- Optimisation of FS: I am sure this is purely panel related. Testing conducted in the Mojave, where I have no installed scenery whatsoever!
- Code tidying: Mostly grouping things better, removing duplicate statements and using 's' vars for repeatedly called values. To be honest I have not actually seen any real difference in doing this, apart from spotting a few silly errors in my previous code.
- Optimising gauge bitmaps: Removing the 'excess' in bitmaps (making them the minimum rectangle to contain the relevant image) and using clip commands in place of masks where I can get away with it. This has apparently helped a bit but still didn't seem to make a huge difference. I also reduced bmps to 256 colour or less where possible.
- Panel.cfg rearrangement: Moved a load of gauges from the main panel layer into the second one - basically all the 'non visible' xml gauges to control systems etc are now in there with the overlays. The main drawn panel gauges are still in the same layer with the background bitmap. This has actually made a really big difference (more than any of the others)!
- Is there a special format I should use for the background bitmap?
- The splitting of a long list of gauges into two layers appeared to give a performance improvement. Is that logical based on the way panels are drawn? I would have thought not but the evidence says otherwise.
- Is there any known difference in performance between 1) an XML gauge with 1000 lines of code each of which is in it's own element compared to the same code all in one element? 2) Displaying and rotating a bitmap with 10000 pixels compared to 100 bitmaps containing 100 pixels each?
- If a panel section has a large number of gauges with different update rates, and then those are 'constrained' with a draw_order statement, does that draw order have to happen before the panel can refresh? If this was the case then perhaps my draw_order usage should be minimised.
Cheers,
Geoff

