20,741
edits
m (→Related: add a few pointers to related modules) |
m (→Approach: why writing a Nasal/HUD parser to come up with a draw API might be a good idea, based on: https://sourceforge.net/p/flightgear/mailman/message/36399261/) |
||
Line 79: | Line 79: | ||
Once the canvas.draw module is sufficiently mature it would be reviewed and get committed to the base package. | Once the canvas.draw module is sufficiently mature it would be reviewed and get committed to the base package. | ||
== HUD Parser == | |||
James mentioned that he would like to see Canvas-based reimplementations of the currently hard-coded HUD/2D panels systems, including hooks to trigger such Canvas/Nasal replacements instead of the legacy code: | |||
The aim would be to replace the C++ code with a Nasal HUD layer, likely in FG_DATA/Canvas/Hud - with one Canvas HUD item per each of the current C++ HUD items (ladder, tape, dial etc). Each one should be fairly easy to build with some path, text and group commands. | |||
Then we need to write an XML loader in Nasal, possibly one line of C++ to trigger loading, and we can remove the C++ HUD code in favour of the Canvas implementation. | |||
[...] | |||
map the old 2D panel code which uses raw OpenGL calls, to instead build up Canvas items (textures, transforms, text) and update them. Some things are easier here by using C++ - we can keep the same XML parser and the texture loading is much simpler. | |||
In both cases the aim is to remove legacy OpenGL 1.x code, since these are some of the awkward remaining pieces.<ref>https://sourceforge.net/p/flightgear/mailman/message/36399261/</ref> | |||
== Resources == | == Resources == |