Tweaks to osglogo to allow you to export alpha blended screenshots

This commit is contained in:
Robert Osfield 2006-08-23 13:16:12 +00:00
parent 1fa331034c
commit ce8d8c09e1

View File

@ -423,7 +423,7 @@ osg::Node* createLogo(const std::string& filename)
// backdrop->addChild(createBackdrop(corner,top,right));
osg::ClearNode* backdrop = new osg::ClearNode;
backdrop->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f));
backdrop->setClearColor(osg::Vec4(1.0f,1.0f,1.0f,0.0f));
//osg::Vec3 lightPosition(-500.0f,-2500.0f,500.0f);
//osg::Node* scene = createShadowedScene(logo_group,backdrop,lightPosition,0.0f,0);
@ -453,9 +453,14 @@ arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationNam
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("ps","Render the Professional Services logo");
osg::DisplaySettings::instance()->setMinimumNumAlphaBits(8);
// construct the viewer.
osgProducer::Viewer viewer(arguments);
viewer.setWriteImageFileName("logo.rgb");
// set up the value with sensible default event handlers.
viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);