FlightGear and OpenGL Core Profile: Difference between revisions
m (→Affected Features / Sources: https://www.raspberrypi.org/forums/viewtopic.php?t=247586#p1516785) |
|||
Line 50: | Line 50: | ||
| 2D Panels || $FG_SRC/Cockpit || legacy 2D panels (could use [[Canvas]]) || {{Pending}} | | 2D Panels || $FG_SRC/Cockpit || legacy 2D panels (could use [[Canvas]]) || {{Pending}} | ||
|- | |- | ||
| Canvas | | [[Canvas Path]] (Shiva) || $SG_SRC/canvas || needs some thinking, probably native OpenVG on RPi <ref>https://github.com/ajstarks/openvg</ref> <ref>http://mindchunk.blogspot.com/2012/09/openvg-on-raspberry-pi.html</ref> or an OpenGL based implementation like nanovg <ref>https://www.raspberrypi.org/forums/viewtopic.php?t=247586#p1516785</ref> || {{Pending}} | ||
|- | |- | ||
| [[Effects]] || $FG_ROOT/Effects || not important for the time being || {{Pending}} | | [[Effects]] || $FG_ROOT/Effects || not important for the time being || {{Pending}} |
Revision as of 14:46, 5 April 2020
This article is a stub. You can help the wiki by expanding it. |
Portability & Compatibility |
---|
Performance |
Efforts |
Objective
Some FG users are very interested in seeing how FlightGear runs on low end hardware - because they may have a collection of it :)
Probably to do it initially, gles1 would have to be used - I think gles2 has no fixed function - and simgear/flightgear would have to be patched to use only OSG calls (if possible)
I know OSG can have gles{1,2} support without windowing compiled in
Background
See Howto:Optimizing FlightGear for mobile devices for the main article about this subject. |
being able to run fgfs on such, comparatively low-powered, system is actually a good thing for fgfs as a whole - it can help us understand bottlenecks that are hardly visible on typical gaming rigs, but that may still show up over time (think leaking listeners/memory) - this sort of thing can also be considered the prerequisite for people wanting to target/build/run fgfs on other embedded hardware, such as thin clients with integrated GPUs or even mobile phones (think Android)
In other words, if the right people were to team up to specifically such hardware, this could also mean significant performance improvements for people on powerful gaming rigs.
Approach
For starters, we can try the FlightGear Headless option to build a fgfs version without any graphics at all.
The next step will be identifying and excluding problematic sources (those containing legacy/raw OpenGL code, e.g. using glBegin()
or glEnable()
respectively) by adding #ifdef
macros to the sources in question, and updating CMakeLists.txt accordingly, ideally in conjunction with a feature-specific build option to disable the corresponding feature (think PUI or the HUD).
Initially, this will probably include:
- $FG_SRC/GUI (see: PUI)
- $FG_SRC/Cockpit
See Developing using CMake for the main article about this subject. |
We should add separate build options to explicitly disable these features individually, e.g.:
-DDISABLE_PUI
-DDISABLE_2DPANELS
Successfully disabling a feature means primarily:
- adding a corresponding new build option to the top-level CMakeLists.txt (e.g. DISABLE_PUI)
- opening fg_init.cxx and navigating to the lines where the feature/subsystem is initialized
- wrapping the corresponding code in between
#ifdef...#endif
blocks - locating any remaining references to the subsystem in question and repeating the last step there
Affected Features / Sources
Feature | Directory | Notes | Status |
---|---|---|---|
PUI | $FG_SRC/GUI | can be replaced via Phi | Pending |
2D Panels | $FG_SRC/Cockpit | legacy 2D panels (could use Canvas) | Pending |
Canvas Path (Shiva) | $SG_SRC/canvas | needs some thinking, probably native OpenVG on RPi [1] [2] or an OpenGL based implementation like nanovg [3] | Pending |
Effects | $FG_ROOT/Effects | not important for the time being | Pending |
Porting
Vertex Buffer Objects
Canvas.Path (OpenVG)
See also
- FlightGear Headless
- Howto:Optimizing FlightGear for mobile devices
- Graphics card profiles
- Canvas and OpenGL ES
- FlightGear and old Hardware
- Compositor
References
References |