Ok, I think I solved it.
There is quite a catch to the following OSG FX method:
Code:
void Technique::addPass(osg::StateSet* ss)
{
if (ss) {
_passes.push_back(ss);
ss->setRenderBinDetails(static_cast<int>(_passes.size()), "RenderBin");
}
}
Then again, this is was setRenderingHints does (yes, that's source code comment
is in there, it's the 3.2.0 source):
Code:
void StateSet::setRenderingHint(int hint)
{
_renderingHint = hint;
// temporary hack to get new render bins working.
switch(_renderingHint)
{
case(TRANSPARENT_BIN):
{
_binMode = USE_RENDERBIN_DETAILS;
_binNum = 10;
_binName = "DepthSortedBin";
break;
}
case(OPAQUE_BIN):
{
_binMode = USE_RENDERBIN_DETAILS;
_binNum = 0;
_binName = "RenderBin";
break;
}
default: // DEFAULT_BIN
{
setRenderBinToInherit();
break;
}
}
}
So what I did before (in Technique::add_passes) did NOT work:
Code:
stateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
addPass(stateSet.get());
But reversing the order DOES work:
Code:
addPass(stateSet.get());
stateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
The order makes the difference since both have functionality similar to
"setRenderBinDetails" - but with different settings.
Good to know how addPass() and setRenderingHint() work.
Is my interpretation correct?
Cheers,
Florian
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56587#56587
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org