Fleshed out a bit more of the ShadowTexture implementation

This commit is contained in:
Robert Osfield
2007-02-16 10:20:10 +00:00
parent 9119f4d3c3
commit fd3a0c25ba
3 changed files with 165 additions and 8 deletions

View File

@@ -205,7 +205,7 @@ void ShadowVolume::init()
if (_drawMode == osgShadow::ShadowVolumeGeometry::STENCIL_TWO_SIDED)
{
osg::notify(osg::NOTICE)<<"STENCIL_TWO_SIDED seleteced"<<std::endl;
osg::notify(osg::NOTICE)<<"STENCIL_TWO_SIDED selected"<<std::endl;
osg::StateSet* ss_sv1 = geode->getOrCreateStateSet();
ss_sv1->setRenderBinDetails(shadowVolumeBin, "RenderBin");
@@ -213,7 +213,7 @@ void ShadowVolume::init()
}
else
{
osg::notify(osg::NOTICE)<<"STENCIL_TWO_PASSES seleteced"<<std::endl;
osg::notify(osg::NOTICE)<<"STENCIL_TWO_PASSES selectetd"<<std::endl;
osg::StateSet* ss_sv1 = geode->getOrCreateStateSet();
ss_sv1->setRenderBinDetails(shadowVolumeBin, "RenderBin");
@@ -407,7 +407,7 @@ void ShadowVolume::cull(osgUtil::CullVisitor& cv)
}
_ambientLight->setPosition(lightpos);
if (selectLight)
orig_rs->addPositionedAttribute(0,_ambientLight.get());
_diffuseLight->setPosition(lightpos);
@@ -417,7 +417,6 @@ void ShadowVolume::cull(osgUtil::CullVisitor& cv)
_diffuseLight->setDiffuse(selectLight->getDiffuse());
_diffuseLight->setSpecular(selectLight->getSpecular());
_diffuseLight->setSpecular(selectLight->getSpecular());
_diffuseLight->setDirection(selectLight->getDirection());
_diffuseLight->setConstantAttenuation(selectLight->getConstantAttenuation());
_diffuseLight->setLinearAttenuation(selectLight->getLinearAttenuation());