FlightGear Newsletter May 2012: Difference between revisions

Jump to navigation Jump to search
m
Canvas
(Canvas)
m (Canvas)
Line 24: Line 24:
Tom is currently working on a 2D drawing API. The basic idea is to draw arbitrary 2D shapes and text to a texture and place it somewhere in the scene, like for example on virtual displays or as a HUD. This so called canvas should be controlled only by using the property tree, and will among other advantages, greatly simplify the creation of complex instruments which can be found in todays glass cockpits.
Tom is currently working on a 2D drawing API. The basic idea is to draw arbitrary 2D shapes and text to a texture and place it somewhere in the scene, like for example on virtual displays or as a HUD. This so called canvas should be controlled only by using the property tree, and will among other advantages, greatly simplify the creation of complex instruments which can be found in todays glass cockpits.


Currently it is possible to draw text, transform it, change it's style (color, background, font, etc.) and all of this through the property tree. To simplify the usage also exists an experimental Nasal API which provides an object orientated wrapper around the property tree interface to the canvas.
Currently it is possible to draw text, transform it, change it's style (color, background, font, etc.) and all of this through the property tree. To simplify the usage there also exists an experimental Nasal API which provides an object orientated wrapper around the property tree interface to the canvas.


The code is available in the latest development versions of FlightGear and Tom has already tested many scenarios, but it would be great if you can try it out on your own and report bugs or provide some feedback.
The code is available in the latest development versions of FlightGear. The long term (after FlightGear 2.8) idea is to eventually port some other 2D elements to this backend (eg the HUD and 2D panels) so they use OSG (and osgText) natively, and hence reduce the amount of C++ code we have for these jobs. (And increase our chances of working with never OpenGL versions that forbid old style GL calls).
 
The long term (after FlightGear 2.8) idea is to eventually port some other 2D elements to this backend (eg the HUD and 2D panels) so they use OSG (and osgText) natively, and hence  
reduce the amount of C++ code we have for these jobs. (And increase our chances of working with never OpenGL versions that forbid old style GL calls).


In the meantime the more testing and feedback we can get the better. In particular this system should offer a much more efficient way to build CDU  
In the meantime the more testing and feedback we can get the better. In particular this system should offer a much more efficient way to build CDU  
166

edits

Navigation menu