Updated wrappers

This commit is contained in:
Robert Osfield
2006-08-02 21:09:25 +00:00
parent 9e7b07fbcf
commit 7eb7bbdb84
6 changed files with 29 additions and 11 deletions

View File

@@ -419,6 +419,16 @@ osg::Group* create3DText(const osg::Vec3& center,float radius)
text4->setText("SCREEN");
geode->addDrawable(text4);
///////////////////////////////////////////////
// Added to show osgText state set malfunction
osg::StateSet *textStateSet = new osg::StateSet();
textStateSet->setMode(GL_BLEND, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
textStateSet->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED);
// This works:
//geode->setStateSet(textStateSet);
// This doesn't work:
text4->setStateSet(textStateSet);
osg::ShapeDrawable* shape = new osg::ShapeDrawable(new osg::Sphere(center,characterSize*0.2f));
shape->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::ON);
geode->addDrawable(shape);