OSGText Issues: Difference between revisions

Jump to navigation Jump to search
m
https://sourceforge.net/p/flightgear/mailman/message/37149210/
m (→‎Investigation: https://sourceforge.net/p/flightgear/mailman/message/36240313/)
m (https://sourceforge.net/p/flightgear/mailman/message/37149210/)
Line 5: Line 5:


The OSGText animation (README.osgtext) doesn't play nice with shaders.<ref>https://forum.flightgear.org/viewtopic.php?f=87&t=37429&p=376110#p376110</ref>
The OSGText animation (README.osgtext) doesn't play nice with shaders.<ref>https://forum.flightgear.org/viewtopic.php?f=87&t=37429&p=376110#p376110</ref>
It’s a fairly large number of aircraft: the text animation has been around for a long time, prior to Canvas for example.
The problem is not us keeping 3.4.x around : it would be nice to switch to 3.6 everywhere, but we support both today.
The text issue has existed with OSG 3.6 for many years, without anyone stepping up to fix it.<ref>https://sourceforge.net/p/flightgear/mailman/message/37149210/</ref>


The problem looks to be the known OSGText coloration problem seen with newer versions of OSG... OSG changed the way that it does the colors and the old OpenGL style is no longer used by OSG... FG simply hasn't kept up with all the changes in OSG... this problem has been around since i came to the project 4 or so years back... none of the devs have had the time to refactor the way FG handles OSGText so here we are... someone will get to it one day... for now the main project uses an older version of OSG with the breaking commit reverted... the PPA does not and neither do most of us building our own binaries..<ref>https://forum.flightgear.org/viewtopic.php?p=353286#p353286</ref>
The problem looks to be the known OSGText coloration problem seen with newer versions of OSG... OSG changed the way that it does the colors and the old OpenGL style is no longer used by OSG... FG simply hasn't kept up with all the changes in OSG... this problem has been around since i came to the project 4 or so years back... none of the devs have had the time to refactor the way FG handles OSGText so here we are... someone will get to it one day... for now the main project uses an older version of OSG with the breaking commit reverted... the PPA does not and neither do most of us building our own binaries..<ref>https://forum.flightgear.org/viewtopic.php?p=353286#p353286</ref>
Line 96: Line 101:
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>
The problem with the text-animations is no one yet did the R&D work to actually decide *what the new approach will even look like*. What we don’t want is aircraft developers hacking up nasty work-arounds in a hurry, which might be very inefficient, but which will then hang around even when a proper solution is developed. At least one proposed work-around is very inefficient, and might cause other failures depending on the user’s GPU and drivers (using one Canvas to replace each text-animation; if we hit an internal limit on FBOs, we will stop arbitrary Canvas updating)
The practical next step which might be feasible, and which we’re waiting for, is for someone to prototype some solutions: for example rendering all <text> to a single internal FBO/texture-atlas and then building textured-quads to hold pieces of that texture in the same place as the old osgText nodes; the quads can then get an Effect applied. There’s variations on that approach, some exploration and R&D is needed for sure. <ref>https://sourceforge.net/p/flightgear/mailman/message/37149210/</ref>


== References ==
== References ==

Navigation menu