Skip to content

Commit 6d92744

Browse files
author
Daniel Wickeroth
committed
MADIconnect: transparency fix
1 parent 4345a19 commit 6d92744

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/OpenCOVER/plugins/ukoeln/MADIconnect/MADIconnect.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,14 @@ void MADIconnect::handleMessage(Message *m)
616616
if (geode)
617617
{
618618
std::cout << "MADIconnect:: Found geode for neuron: " << neuronName << std::endl;
619-
VRSceneGraph::instance()->setColor(geode, rgb, 1.0f);
619+
VRSceneGraph::instance()->setColor(geode, rgb, alpha);
620+
if (alpha < 0.999f)
621+
{
622+
cout << "MADIconnect:: Setting transparency." << endl;
623+
osg::StateSet* ss = geode->getOrCreateStateSet();
624+
ss->setMode(GL_BLEND, osg::StateAttribute::ON);
625+
ss->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
626+
}
620627
}
621628
else
622629
{

0 commit comments

Comments
 (0)