mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Fix regression in handling of NiZBufferProperty
This commit is contained in:
parent
6d8c414071
commit
f3045331f1
1 changed files with 3 additions and 6 deletions
|
@ -1597,12 +1597,9 @@ namespace NifOsg
|
||||||
{
|
{
|
||||||
const Nif::NiZBufferProperty* zprop = static_cast<const Nif::NiZBufferProperty*>(property);
|
const Nif::NiZBufferProperty* zprop = static_cast<const Nif::NiZBufferProperty*>(property);
|
||||||
// VER_MW doesn't support a DepthFunction according to NifSkope
|
// VER_MW doesn't support a DepthFunction according to NifSkope
|
||||||
static osg::ref_ptr<osg::Depth> depth;
|
osg::ref_ptr<osg::Depth> depth = new osg::Depth;
|
||||||
if (!depth)
|
|
||||||
{
|
|
||||||
depth = new osg::Depth;
|
|
||||||
depth->setWriteMask((zprop->flags>>1)&1);
|
depth->setWriteMask((zprop->flags>>1)&1);
|
||||||
}
|
depth = shareAttribute(depth);
|
||||||
node->getOrCreateStateSet()->setAttributeAndModes(depth, osg::StateAttribute::ON);
|
node->getOrCreateStateSet()->setAttributeAndModes(depth, osg::StateAttribute::ON);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue