Canvas instancing
Jump to navigation
Jump to search
This article is a stub. You can help the wiki by expanding it. |
The FlightGear forum has a subforum related to: Canvas |
not sure if we can share the canvas elements across displays, so I've made copies of everything for each display.[1] — Richard
|
Without some C++ level sharing of instanced elements, large numbers of complex (SVG path) symbols + DATA will be an issue. [...]
Tom has mentioned a sprite cache for instancing, that would work great as a solution[2] — James Turner
|
Is it possible to duplicate a SVG element in Nasal? I'd like to draw a symbol only once in the SVG and then place multiple instances of it on my display. They need to be unique elements, as I'd like to animate them independently.[3] — Gijs
|
Unfortunately we have no way to share canvas::Elements between canvases - it's possible at the OSG level but not at any higher level that is exposed. So you probably end up just duplicating the paths and so on.[4] — James Turner
|
There are some things the Canvas / Map layer do which are not very performance-friendly, especially the symbol-caching / texture-atlasing can be managed better[5] — James Turner
|
I need to have some discussions with Tom about symbol instancing, since the vector symbols I'm doing for waypoints, VORs and so on should ideally be shared. I'll let Tom speak about his ideas for that.[6] — James Turner
|
I'm thinking about using a separate canvas for each symbol so that every instance of it is just a textured quad. For efficiency reasons it would be good to draw all symbols to a single canvas/texture and put all quads into a single node. So probably I'll add a new element type for putting quads into a single element which are all rendered at once. Maybe we can even use a geometry shader to just copy the positions to the GPU and generate the full quads with the shader. Ideas and suggestions are always welcome [7] — Thomas Geymayer
|
References
References
|