Hi Eric, The size issue is probably down to the default glyph texture size begin 512 x 512. These days its possible safe for us to up this to 2k by 2k. You can set this size via Font::setTextureSizeHint(width,height).
Robert. On 4/25/07, E. Wing <[EMAIL PROTECTED]> wrote:
Thanks, that seemed to help. A few follow up questions though: - Are there any bad side effects I need to worry about when using this? So had to crank it up to about 20 to get something I could tolerate in my quick test cases. Cranking it up to 40 causes a crash in my program with a "Warning: unable to allocate texture big enough for glyph". What is the limit I'm looking at before I cause problems? Will I introduce other rendering problems (e.g. things spaced too far)? - I noticed that there is no non-const version of getFont() in osgText::Text. How am I supposed to set setGlyphImageMargin() without an ugly const_cast? - Is there an easy way to globally set the GlyphImageMargin default value so I don't need to hunt down each text object instance I have and set it? Thanks, Eric > Date: Wed, 25 Apr 2007 11:14:46 +0100 > From: "Robert Osfield" <[EMAIL PROTECTED]> > Subject: Re: [osg-users] osgText bug: strange edge artifacting > Hi Eric, > > It looks like mipmapping is causing problems, the mipmaps are computed > by the driver, which might also go some way to explaining why I don't > see the same issues on my machine. > > There is also a chance that the packing of the glyphs is to tight, > such that adjacent glyphs are bleeding into each other. You you try > increasing the margin using: > > osgText::Font::setGlyphImageMargin(int) > > First you'll need to get the Font, then set it up, the default margin > is just 2, for large font resolutions this could well be too small, > and a percentage is possible my more appropriate. When I originally > wrote osgText I did consider using the precentage, but found the > margin would pretty well so just stuck with it. > > Robert. > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
