OpenSceneGraph/include/osgText
Robert Osfield b4fda3a6da From March Sciabica, "Here is the solution I coded up over the weekend. For improved
performance option, I added a flag to control whether the depth writing
pass is performed.

Since text is alpha-blended when rendering, it is placed in the
transparent bin and rendered back to front. Writing to the depth buffer
should therefore be unnecessary. Indeed, rendering something behind text
(or any blended object) after that object is drawn will give incorrect
results whether the depth buffer is written or not. I therefore think it
is safe to keep this option off by default. Users can turn it on for any
special needs they have.

I did not fix the existing backdrop implementations to work with the new
code since this new method of rendering intrinsically handles backdrops
correctly. Its results are more accurate than all of the existing
backdrop implementations. Its only downside is that it requires two
passes if depth buffer updates are desired, whereas DEPTH_RANGE and
POLYGON_OFFSET achieve their (less accurate) results in one pass. The
NO_DEPTH_BUFFER method also only uses one pass, but it disables depth
tests and not depth writes so will have serious problems if anything is
drawn in front of the text before OR after the text is drawn.

Given the better all-around behavior of the new method, I believe the
other backdrop implementations can be safely removed. Code that adjusts
the backdrop implementation will of course be broken if the member
functions are removed. For this reason I left them in, but set the new
rendering method as the default backdrop implementation. At the very
least I think the old backdrop implementations should be deprecated and
removed at a later date.
"

Note from Robert Osfield, testing this submission with osgtext I found that the
text would not render correctly when different text labels were overlapping
in deth and screen space.  I change _enableDepthWrites to default to true and
found the that which artifacts still occurred around the alpha blended edges
the artifacts where better than issue with occlusion of nearer pixels that was
happening with _enableDepthWrites set to false.I therefore set the
_enableDepthWrites to true as I feel it's the lesser of the two artefacts.
2010-09-16 09:09:43 +00:00
..
Export Improved the doxygen docs over the various namespaces 2008-08-05 19:17:09 +00:00
FadeText Added FadeText::setFadeSpeed and made internal data structures protected. 2006-10-24 09:06:28 +00:00
Font Moved TextNode into osgText. 2010-09-07 18:18:35 +00:00
Font3D Refactored to use a typedef of Font to Font3D rather than have a separate Font3D class 2010-09-03 09:08:19 +00:00
Glyph Moved Glyph and Glyph3D out of Font header/source file into their own header/source file. 2010-09-07 18:20:03 +00:00
KerningType Convert osgText and freetype plugin across to keeping the font size as state that 2007-12-23 18:15:54 +00:00
String From Roland Smeenk, "Attached you will find a large set of small typo fixes (mainly in the comments)." 2007-12-10 17:30:18 +00:00
Text From March Sciabica, "Here is the solution I coded up over the weekend. For improved 2010-09-16 09:09:43 +00:00
Text3D Further work on new 3D text support 2010-09-06 15:43:59 +00:00
TextBase From Terry Welsh, "Okay, here are the mods I wrote for drawing a filled bounding box 2009-07-24 14:59:51 +00:00
TextNode From Jean-Sebastien Guay, build fixes for Windows 2010-09-08 08:09:01 +00:00
Version From David Callu, improved consistency of Version strings and add version support 2007-09-05 17:12:24 +00:00