Nope, the text is perfectly positioned until the camera Z value reaches
16900, then it disappears whether the camera is moving or not. It comes back
right away if I move the camera forward again. I am using SCREEN orientation
though.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz
Sent: Tuesday, April 17, 2007 1:40 PM
To: 'osg users'
Subject: RE: [osg-users] osg::Text

Does it disappear and then reappear as soon as you render a few frames while
the camera is motionless?

If so, this is a known artifact of SCREEN orientation and SCREEN-sized text
-- the size/position of the text for a given frame is based on the previous
frame's information. As a result, there's a one-frame latency before the
text appears at the correct location.
   -Paul



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Noah Brickman
> Sent: Tuesday, April 17, 2007 2:17 PM
> To: 'osg users'
> Subject: [osg-users] osg::Text
> 
> I'm having a problem with osg::Text. I create some text and 
> position it in front of the camera. In an update function I 
> continuously reset its position. This all works fine but as I 
> move the camera far back the text abruptly dissapears. Anyone 
> know why? Here is my code...
> 
> font = osgText::readFontFile( "fonts/cour.ttf" ); text = new 
> osgText::Text;
> 
> text->setFont( font.get() );
> 
> text->setPosition( osg::Vec3( 10.f, 0.f, 1.f ) ); setAxisAlignment( 
> text->osgText::Text::SCREEN ); setCharacterSizeMode( 
> text->osgText::Text::SCREEN_COORDS ); setCharacterSize( 50.0f ); 
> text->setFontResolution( 128, 128 ); setAlignment( 
> text->osgText::Text::CENTER_TOP ); setColor( osg::Vec4( 1.f, 
> 1.f, 0.f, 
> text->0.7f ) );
> 
> textGeode = new osg::Geode();
> textGeode->addDrawable( text.get() );
> root->addChild( textGeode.get() );
> 
> text->setText( "N" );
> 
> Later I update the text with this, the text dissapears when 
> topTransZ reaches about 16000.
> 
> text->setPosition( osg::Vec3( topTransX, topTransY+2.1, 
> topTransZ-10 ) 
> text->);
> 
> _______________________________________________
> 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/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to