OSGText Issues: Difference between revisions

Jump to navigation Jump to search
m (https://sourceforge.net/p/flightgear/mailman/message/37149210/)
Line 98: Line 98:
As for mapping to Canvas, James also is not sure how that would work - Canvas Text is also ‘just osgText’ but it seems works for Canvas because the output texture is applied to the cockpit and then effects are applied on top? Doing a safe transformation of osgText-animation to Canvas would mean working out the required canvas extent and somehow mapping it to the correct panel location (and UVs), which he’d be nervous about both the reliability and complexity of. <ref>https://sourceforge.net/p/flightgear/mailman/message/36627559/</ref>
As for mapping to Canvas, James also is not sure how that would work - Canvas Text is also ‘just osgText’ but it seems works for Canvas because the output texture is applied to the cockpit and then effects are applied on top? Doing a safe transformation of osgText-animation to Canvas would mean working out the required canvas extent and somehow mapping it to the correct panel location (and UVs), which he’d be nervous about both the reliability and complexity of. <ref>https://sourceforge.net/p/flightgear/mailman/message/36627559/</ref>


There have been some recurring discussions to fix/port or rather retarget the osgtext animation so that the core implementation uses a canvas fallback internally.
There have been some recurring discussions to fix/port or rather retarget the osgtext animation so that the core implementation uses a canvas FBO fallback internally.
So far, the main concern here has been that allocating one FBO per animation (panel legend) would be rather wasteful.
So far, the main concern here has been that allocating one FBO per animation (panel legend) would be rather wasteful.
Another idea disussed previously was to use a single Canvas FBO to serve as a cache texture and allocate all strings inside that, while registering an effect/shader that merely gets a handle to the canvas SUB-TEXTURE - which is an approach already used elsewhere (namely the Canvas SymbolCache).<ref>https://forum.flightgear.org/viewtopic.php?f=87&t=37429&start=75#p376118</ref>
Another idea disussed previously was to use a single Canvas FBO to serve as a cache texture and allocate all strings inside that, while registering an effect/shader that merely gets a handle to the canvas SUB-TEXTURE - which is an approach already used elsewhere (namely the Canvas SymbolCache).<ref>https://forum.flightgear.org/viewtopic.php?f=87&t=37429&start=75#p376118</ref>

Navigation menu