[osg-users] Text rendering

Michele Bosi michele.bosi at gmail.com
Fri Jan 4 09:00:07 PST 2008


Thank you Chase this is exactly what i needed :)
I have another question to ask but for that I will start another
thread for clarity.

Michele

On Jan 4, 2008 5:31 PM, Bradford, Chase <CHASE.BRADFORD at saic.com> wrote:
>
> You might be able to accomplish what you want by setting text->setCharacterSizeMode( osgText::Text::SCREEN_COORDS ).  That applies a scale that warps the text into pixel coordinates, instead of object coordinates.
>
> Chase
>
>
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org on behalf of Michele Bosi
> Sent: Fri 1/4/2008 8:25 AM
> To: OpenSceneGraph Users
> Subject: [osg-users] Text rendering
>
> Hello,
> in my programs I would like to show some text "following" the objects
> that are in the scene.
> Till now the solution that I found was to create an osgText::Text
> object and do something like:
>
>   text->setPosition( world space position );
>   text->setAutoRotateToScreen(true);
>
> the problem is that the text is draw very big, and is affected by
> perspective projection which in this case I wouldn't like.
> Basicly I need a text that behaves like if it was drawn on a HUD but
> whose position on the screen is based on the objects they are
> following
> (that is, is the projection on the screen of some world space
> coordinates). How can I accomplish this?
> The only solution I have in mind is to put all the text objects on a
> HUD (which complicates a lot the design of my program) and to compute
> by hand, every frame, the projection of the objects they are
> following, so that i can assign it to the text objects.
> Isn't there a built in functionality to achieve the same result?
>
> Thanks,
> Michele
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


More information about the osg-users mailing list