Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <osg/Notify>
- #include <osgText/Text>
- int
- main(int argc, char** argv)
- {
- osg::BoundingBox bbox;
- osgText::Text* text = new osgText::Text();
- text->setText("Hello, world.");
- text->setShaderTechnique(osgText::GREYSCALE);
- bbox = text->getBoundingBox();
- OSG_NOTICE << "GREYSCALE, bbox width = " << (bbox.xMax() - bbox.xMin()) << ", height = " << (bbox.yMax() - bbox.yMin()) << std::endl;
- text->setShaderTechnique(osgText::SIGNED_DISTANCE_FIELD);
- bbox = text->getBoundingBox();
- OSG_NOTICE << "SDF, bbox width = " << (bbox.xMax() - bbox.xMin()) << ", height = " << (bbox.yMax() - bbox.yMin()) << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement