Hackathon Proposal: CompositeViewer and Canvas: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Some refactoring)
No edit summary
Line 5: Line 5:
|supporters=
|supporters=
|status=
|status=
|summary=[[CompositeViewer_Support]] already allows us to create multiple top-level windows showing different views of the same scenery.
|summary=[[CompositeViewer_Support]] already allows us to create multiple top-level windows showing different views of the same scenery.


Line 18: Line 19:


|background=
|background=
[[CompositeViewer_Support]].


Information about Canvas from Hooray
Information about Canvas from Hooray
Line 27: Line 27:


the patch is experimental, it will basically look up a view and dynamically add a slave camera to the renderer that renders the whole thing to a Canvas, a Canvas is a fancy word for a RTT/FBO context in FlightGear that can be updated by using a property-based API built on top of the property tree in the form of events/signals that are represented via listeners.Which is to say each Canvas has a handful of well-defined property names (and types) that it is watching to handle "events" - think stuff like changing the sie/view port etc. And then there is a single top-level root group, which serves as the top-level element to keep other Canvas elements.A Canvas element is nothing more than a rendering primitive that the Canvas system can handle - e.g. stuff like a raster image can be added to a Canvas group, a text string/font, and 2D drawing primitives in the form of OpenVG instrutions mapped to ShivaVG. And that's basically about it (with a few exceptions that handle use-case specific stuff like 2D mapping/charts).Apart from that, the main thing to keep in mind is that a Canvas is really just a FBO - i.e. an invisible RTT context - to become actually visible, you need to add a so called "placement" - this tells the rendering engine to look up a certain canvas and add it to the scene/cockpit or the GUI (dialogs/windows).
the patch is experimental, it will basically look up a view and dynamically add a slave camera to the renderer that renders the whole thing to a Canvas, a Canvas is a fancy word for a RTT/FBO context in FlightGear that can be updated by using a property-based API built on top of the property tree in the form of events/signals that are represented via listeners.Which is to say each Canvas has a handful of well-defined property names (and types) that it is watching to handle "events" - think stuff like changing the sie/view port etc. And then there is a single top-level root group, which serves as the top-level element to keep other Canvas elements.A Canvas element is nothing more than a rendering primitive that the Canvas system can handle - e.g. stuff like a raster image can be added to a Canvas group, a text string/font, and 2D drawing primitives in the form of OpenVG instrutions mapped to ShivaVG. And that's basically about it (with a few exceptions that handle use-case specific stuff like 2D mapping/charts).Apart from that, the main thing to keep in mind is that a Canvas is really just a FBO - i.e. an invisible RTT context - to become actually visible, you need to add a so called "placement" - this tells the rendering engine to look up a certain canvas and add it to the scene/cockpit or the GUI (dialogs/windows).
|details= [[File:Canvas-view-element-prototype-by-icecode gl.png|thumb]]
|details= [[File:Canvas-view-element-prototype-by-icecode gl.png|thumb]]
* [[Canvas Sandbox]]
* [[Canvas Sandbox]]
Line 35: Line 36:


|skills=C++
|skills=C++
|opportunities= <p/>
|opportunities= <p/>
* OpenSceneGraph
* OpenSceneGraph
Line 40: Line 42:
* CompositeViewer
* CompositeViewer
* Compositor
* Compositor
|notes = It would make sense to reach out to Jules (CompositeViewer) and Fernando (Compositor) to learn how to best approach this today.
 
|notes =
 
More info from Hooray:
 
It would make sense to reach out to Jules (CompositeViewer) and Fernando (Compositor) to learn how to best approach this today.


The basic boilerplate needed to add/register a new Canvas element can be seen below:
The basic boilerplate needed to add/register a new Canvas element can be seen below:
219

edits

Navigation menu