Howto:Building FlightGear without HiDPI support
This article is a stub. You can help the wiki by expanding it. |
Problem
there were discussions on the devel list making OpenSceneGraph 3.4 a requirement, because as of 12/2017, FlightGear does no longer build with OSG 3.2.1 (i.e. Ubuntu LTS) - despite the commit logs suggesting so.
James mentioned big hurdles trying to fix the problem(s) with OSG 3.2, even asking on the OSG mailing-list where OSG 3.2 was apparently considered obsolete and essentially unsupported, so since most distros seem to offer OSG 3.4, it is likely to remain a requirement from now on. [2]
This article details how to revert the corresponding changes to build FlightGear without HiDPI support, for those still having to use older OSG versions until a better fix is found.
Background
James pushed a change which changes how we integrate PUI into the renderer and other systems; this makes our PUI usage more modular, so it can be enabled / disabled in a standard way.
It also renders PUI via an FBO so we can use it safely (and scale it) on HiDPI screens, since PUI is too old to support a scaling factor as more modern UI toolkits would do. James has done a fair amount of testing, and everything seems to be working, but if you see any changes in how PUI reacts to mouse or key presses, or the appearance of things, please let him know.
It’s using the same code as it always did but starting from a slightly different place, both in terms of drawing and event handling.
One temporary regression: right now CanvasWidget (the mechanism by which we include Canvas content into PUI) is messed up because previously PUI had no alpha channel, so the canvas’s alpha was ignored.
With the new system, the alpha is actually being used, but this is not really desired James thinks - it shows up as a semi-transparent map background in the ‘Select airport’ airfield chart, and in the Map-Canvas window at least. James thought he had a work-around for this, but the one he came up with is awkward to support on Windows, he needs to think on a better solution, so in the meantime he pushed a hack so at least Windows still builds and runs. (If your canvas content inside PUI has an opaque background, you’ll be fine, so one fix is just to adjust the Canvas code for those dialogs, but James would like to find a backwards compatible fix) [3]
Commits
- FlightGear commit 89ca665bfbf91bbd0a203d0d8138ea2114036d39
- FlightGear commit ac50a3c7ed88687a568077262999e681bc880e8a
- FlightGear commit e090427591f8a15adb4a9376ad2d5e3fd413916f
- FlightGear commit c1df6e9d1528fc2513c6f455f0c0ccc6ca74e34a
- FlightGear commit 804dc4e74ab921f196ca5e09eb7cd6de74b09c0d
Instructions
check out a new topic branch in $FG_SRC:
git checkout next
git pull origin next
git checkout -b topics/disable-HiDPI
revert all HiDPI related commits:
git revert 89ca665bfbf91bbd0a203d0d8138ea2114036d39 ac50a3c7ed88687a568077262999e681bc880e8a e090427591f8a15adb4a9376ad2d5e3fd413916f c1df6e9d1528fc2513c6f455f0c0ccc6ca74e34a 804dc4e74ab921f196ca5e09eb7cd6de74b09c0d
References
References
|