Put airport lights in RenderBin to enable glow

This commit is contained in:
Frederic Bouvier 2012-01-24 23:13:15 +01:00
parent 2822006d01
commit 1fa27f2d19

View File

@ -178,7 +178,7 @@ Effect* getLightEffect(float size, const Vec3& attenuation,
return eitr->second.get(); return eitr->second.get();
// Basic stuff; no sprite or attenuation support // Basic stuff; no sprite or attenuation support
Pass *basicPass = new Pass; Pass *basicPass = new Pass;
basicPass->setRenderBinDetails(POINT_LIGHTS_BIN, "DepthSortedBin"); basicPass->setRenderBinDetails(POINT_LIGHTS_BIN, "RenderBin");
basicPass->setMode(GL_LIGHTING, osg::StateAttribute::OFF); basicPass->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
StateAttributeFactory *attrFact = StateAttributeFactory::instance(); StateAttributeFactory *attrFact = StateAttributeFactory::instance();
basicPass->setAttributeAndModes(attrFact->getStandardBlendFunc()); basicPass->setAttributeAndModes(attrFact->getStandardBlendFunc());
@ -336,7 +336,7 @@ SGLightFactory::getLights(const SGLightBin& lights, unsigned inc, float alphaOff
if (!simpleLightSS.valid()) { if (!simpleLightSS.valid()) {
StateAttributeFactory *attrFact = StateAttributeFactory::instance(); StateAttributeFactory *attrFact = StateAttributeFactory::instance();
simpleLightSS = new StateSet; simpleLightSS = new StateSet;
simpleLightSS->setRenderBinDetails(POINT_LIGHTS_BIN, "DepthSortedBin"); simpleLightSS->setRenderBinDetails(POINT_LIGHTS_BIN, "RenderBin");
simpleLightSS->setMode(GL_LIGHTING, osg::StateAttribute::OFF); simpleLightSS->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
simpleLightSS->setAttributeAndModes(attrFact->getStandardBlendFunc()); simpleLightSS->setAttributeAndModes(attrFact->getStandardBlendFunc());
simpleLightSS->setAttributeAndModes(attrFact->getStandardAlphaFunc()); simpleLightSS->setAttributeAndModes(attrFact->getStandardAlphaFunc());
@ -452,7 +452,7 @@ SGLightFactory::getVasi(const SGVec3f& up, const SGDirectionalLightBin& lights,
return 0; return 0;
osg::StateSet* stateSet = drawable->getOrCreateStateSet(); osg::StateSet* stateSet = drawable->getOrCreateStateSet();
stateSet->setRenderBinDetails(POINT_LIGHTS_BIN, "DepthSortedBin"); stateSet->setRenderBinDetails(POINT_LIGHTS_BIN, "RenderBin");
stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF); stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
osg::BlendFunc* blendFunc = new osg::BlendFunc; osg::BlendFunc* blendFunc = new osg::BlendFunc;