Changeset 12289
- Timestamp:
- 04/19/11 11:53:34 (2 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/examples/osgtext/osgtext.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgtext/osgtext.cpp
r11800 r12289 387 387 osg::Geode* geode = new osg::Geode; 388 388 389 389 390 //////////////////////////////////////////////////////////////////////////////////////////////////////// 390 391 // … … 393 394 394 395 float characterSize=radius*0.2f; 395 396 397 396 398 osg::Vec3 pos(center.x()-radius*.5f,center.y()-radius*.5f,center.z()-radius*.5f); 397 399 … … 420 422 geode->addDrawable(text3); 421 423 424 osg::Vec4 characterSizeModeColor(1.0f,0.0f,0.5f,1.0f); 422 425 423 426 osgText::Text* text4 = new osgText::Text; … … 427 430 text4->setAxisAlignment(osgText::Text::SCREEN); 428 431 429 osg::Vec4 characterSizeModeColor(1.0f,0.0f,0.5f,1.0f); 432 // reproduce outline bounding box compute problem with backdrop on. 433 text4->setBackdropType(osgText::Text::OUTLINE); 434 text4->setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX); 435 436 text4->setText("SCREEN"); 437 geode->addDrawable(text4); 430 438 431 439 osgText::Text* text5 = new osgText::Text; … … 437 445 text5->setAxisAlignment(osgText::Text::SCREEN); 438 446 text5->setCharacterSizeMode(osgText::Text::SCREEN_COORDS); 447 text5->setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX); 439 448 text5->setText("CharacterSizeMode SCREEN_COORDS(size 32.0)"); 440 449 geode->addDrawable(text5); … … 460 469 geode->addDrawable(text7); 461 470 462 #if 1 463 // reproduce outline bounding box compute problem with backdrop on. 464 text4->setBackdropType(osgText::Text::OUTLINE); 465 text4->setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX); 466 #endif 467 468 text4->setText("SCREEN"); 469 geode->addDrawable(text4); 471 470 472 471 473 osg::ShapeDrawable* shape = new osg::ShapeDrawable(new osg::Sphere(center,characterSize*0.2f)); … … 679 681 // make sure the root node is group so we can add extra nodes to it. 680 682 osg::Group* group = new osg::Group; 681 683 684 if (true) 682 685 { 683 686 // create the hud. … … 693 696 } 694 697 695 group->addChild(create3DText(center,radius)); 698 if (true) 699 { 700 group->addChild(create3DText(center,radius)); 701 } 696 702 697 703 // set the scene to render
