This doesn't really answer your question, but the bad sheering effect you're getting might be solvable by apply the GL_POLYGON_SMOOTH attribute to the text object.
Chase > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of Jeremy Moles > Sent: Thursday, January 17, 2008 7:45 AM > To: OpenSceneGraph Users > Subject: [osg-users] osgHUD / osgText / RFC > > (This is a separate issue from my blending question which I posted > earlier this week) > > In osgHUD, it is very convenient for me for various reasons to set the > osgText alignment mode to: > > osgText::Text::CENTER_CENTER > > ...which allows me to put a bit of text in the center of a quad and > delegate the responsibility of positioning to my osgHUD::Widget API. > This is all fine and well, and works exactly as advertised. > > However, with regards to quality, there is no guarantee (at least that I > can see) that osgText won't set the position internally of the text to > values that do not map 1:1 to pixels on the screen--that is to say, the > position isn't necessarily "pixel aligned." I looked at the code for > osgText::computePositions() a bit, but figured I'd ask here first in > case I'm missing something obvious. > > My question then is: is there a way to coerce osgText to use > CENTER_CENTER alignment but enforce that the text itself is never > positioned (at least as far as the X and Y planes are concerned) with a > value that isn't pixel aligned? > > Attached are two screenshots of the "osghudmenu" example I'm working on > (which is in SVN if anyone would like to see it!) at the moment. The > first screenshot uses CENTER_CENTER and the second uses LEFT_BOTTOM. Of > course, when I use LEFT_BOTTOM I have to position the text manually > myself (which isn't hard, but certainly creates more code). In both > cases I enforce that the X and Y values to pass to ->setPosition() are > floor()'d, but that doesn't mean that osgText itself won't add 0.5f or > so to the position, especially in CENTER_CENTER mode. To the discerning > eye, you'll see a MAJOR difference... > > Hope I'm making sense. :) > > P. S. Anyone who has any advice on my question from earlier this week > gets a cookie or something. :) _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

