1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 13:53:51 +00:00

Update the shadow frustrum bounds properly

This commit is contained in:
AnyOldName3 2017-10-30 19:54:54 +00:00
parent ef8a7d1cb9
commit ab669a434e

View file

@ -227,6 +227,19 @@ namespace MWRender
popCurrentMask(); popCurrentMask();
} }
void apply(osg::Drawable& drawable)
{
if (isCulled(drawable)) return;
// push the culling mode.
pushCurrentMask();
updateBound(drawable.getBoundingBox());
// pop the culling mode.
popCurrentMask();
}
void apply(osg::Billboard&) void apply(osg::Billboard&)
{ {
OSG_INFO << "Warning Billboards not yet supported" << std::endl; OSG_INFO << "Warning Billboards not yet supported" << std::endl;
@ -547,7 +560,7 @@ namespace MWRender
{ {
osg::ref_ptr<osg::Texture2D> texture = sd->_texture; osg::ref_ptr<osg::Texture2D> texture = sd->_texture;
osg::ref_ptr<osg::StateSet> stateSet = debugGeometry->getOrCreateStateSet(); osg::ref_ptr<osg::StateSet> stateSet = debugGeometry->getOrCreateStateSet();
if (false) if (true)
stateSet->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); stateSet->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON);
else else
stateSet->setTextureAttributeAndModes(0, testTex, osg::StateAttribute::ON); stateSet->setTextureAttributeAndModes(0, testTex, osg::StateAttribute::ON);