Hi call textLabel->setText(strTmp); instead of update()
Cheers. 15.10.2012, 13:42, "Eungil" <slwa...@naver.com>: > Hi, > > I am a very new, and i got a problem with using osg::Text. > > I set the text like this blow. > osg::Geode* textGeode = new osg::Geode(); > osgText::Text* textLabel = new osgText::Text(); > .... > root->addChild(textGeode); // root is a point of osg::group() > > then, i want to display the numbers being continuelly increasing. > the screen I guess will be showen up like this. > 0, 1, 2, 3, 4, 5...... > > In order to achieve this, I typed code within while roop. > > wchar_t strTmp[100]; > swprintf(strTmp, L"%.3d", 0); > textLabel->setText(strTmp); > int index = 0 ; > while(!viewer.done()) > { > swprintf(strTmp, L"%d", ++nIndex); > textLabel->update(); > viewer.frame(); > } > > However, the result is stopped. I think the problem is related to > textLabel->update() line. > > Please, anyone tell me how to change (or update) the text frequently? > > Thank you! > > Cheers, > Eungil > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=50600#50600 > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org