-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Hello ^^
I placed myself underwater and I would like to know why I can not put colors on my 2 ShapeDrawable object I tried without osgOcean and its works but on the example nothing passes as expected I may have forgotten an essential point '
here is my code if needed in the source file application.cpp before the "Set up the viewer": (nothing extraordinary)
osg::ref_ptr<osg::ShapeDrawable> cubeMap = new osg::ShapeDrawable();
osg::ref_ptr<osg::ShapeDrawable> cylinderMap = new osg::ShapeDrawable();
osg::ref_ptr<osg::Group> rootGroup = new osg::Group();
cubeMap->setShape(new osg::Box(osg::Vec3(0.0f, 0.0f, -210.0f), 2.0f));
cylinderMap->setShape(new osg::Cylinder(osg::Vec3(5.0f, 0.0f, -210.0f), 1.0f, 8.0f));
cubeMap->setColor(osg::Vec4f(1.0f, 0.0f, 0.0f, 0.0f));
cylinderMap->setColor(osg::Vec4f(1.0f,0.0f,1.0f,0.0f));
cylinderMap->setColorBinding(osg::Geometry::BIND_OVERALL);
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
geode->addDrawable(cubeMap.get());
geode->addDrawable(cylinderMap.get());
scene->getOceanScene()->addChild(geode);
root->addChild(scene->getScene());
thanks in advance
Metadata
Metadata
Assignees
Labels
No labels