CanvasScenegraph

From FlightGear wiki
Jump to: navigation, search
This article is a stub. You can help the wiki by expanding it.

Objective

Come up with a new Canvas Element for dealing with scene graphs, for example:

  • 3D models
  • slaved scenery views
  • osgEarth (moving map)
  • non-slaved views (CompositeViewer)

Motivation

Background

Approach

  1. We will be modifying CameraGroup.cxx to come up with a simplified version of buildCamera() that renders a pre-configured view to a texture (RTT/FBO) and stores it in the STL container named _textureTargets.
  2. Next, we will be editing CameraGroup.hxx to provide an accessor/getter function taking a std::string& to return an osg::Texture2D from the _textureTargets STL map
  3. the FGCanvasSystemAdapter needs to be extended accordingly (in both, simgear and flightgear)
  4. Then, we will come up with a new Canvas::Element inheriting from Canvas::Image to look up said texture and use that texture by adding it to the Canvas
  5. the next step will involve moving the camera setup to the new Canvas element itself, i.e. out of CameraGroup.cxx
  6. also, we will want to use live properties to change things like view, viewport, width/height etc (see README.multiscreen)
  7. support viewmgr properties

Roadmap

  1. Come up with a simplified version of the CanvasModel element, to use the new CanvasSceneGraph element as its base class

Experiments

References

References