![]() ![]() Howto:Project 3D to 2D coordinates on desktop canvas.Unifying the 2D rendering backend via canvas.Howto:Use a Camera View in an Instrument.Howto:Extending Canvas to support rendering 3D models. ![]() Howto:Extending Canvas to support MathGL.Note This article is primarily of interest to people familiar with Building FlightGear from source, and wanting to extend the Canvas 2D rendering system in SimGear ( $SG_SRC/canvas). Readers are assumed to be familiar with C++ and OSG, the Property Tree and fundamental FlightGear APIs like SGPropertyNode (doxygen), Property Objects, SGSubsystem and SGPropert圜hangeListener (the latter being wrapped via simgear::PropertyBasedElement). The Canvas code itself makes extensive use of the STL and Boost. There are two main ways to extend FlightGear's Canvas system: The latest Canvas/Doxygen docs can be found here. new/extended elements (elements determine what/how something is to be rendered (text,image,line,circle), i.e.new/extended placements (placements determine where a canvas texture is to be placed (shown), e.g.Ī moving map/terrain heightmap, camera views or ESRI shapefile support) new rendering primitives that cannot be easily/efficiently expressed using existing means, e.g.cockpit, scenery, GUI dialog or osgviewer window) Whenever all existing Canvas elements (group, map, text, image, path) should benefit from an addition, such as for example adding effects/shader support, it makes sense to extend the underlying base class itself, i.e. In addition, the map element (a subclass of group) can be extended to support additional map projections (see simgear/simgear/canvas/elements/map/projection.hxx). People just wanting to add a new layer to an existing dialog or instrument, will probably want to refer to Canvas MapStructure instead. The canvas system is a property-driven FlightGear subsystem that allows creating, rendering and updating dynamic OpenGL textures at runtime by setting properties in the main FlightGear Property Tree. The is the sole interfacing mechanism in use by the Canvas system. A so called listener-based subsystem (via SGPropert圜hangeListener) will watch the canvas sub tree in the main property tree for supported "events" (i.e. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |