1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00

Revert "Apply ShaderVisitor to Rig/MorphGeometry source geometry"

This reverts commit 471f6abf6cae0f5e5faf294b9e7373fd5541469a.

The commit should be redundant as of 20e799dadc2172fa1fcb230a0c5d731666a176cc
This commit is contained in:
AnyOldName3 2023-03-06 00:54:57 +00:00
parent 20e799dadc
commit 4aa40897ca

View File

@ -889,28 +889,21 @@ namespace Shader
if (auto rig = dynamic_cast<SceneUtil::RigGeometry*>(&drawable)) if (auto rig = dynamic_cast<SceneUtil::RigGeometry*>(&drawable))
{ {
osg::ref_ptr<osg::Geometry> sourceGeometry = rig->getSourceGeometry(); osg::ref_ptr<osg::Geometry> sourceGeometry = rig->getSourceGeometry();
if (sourceGeometry) if (sourceGeometry && adjustGeometry(*sourceGeometry, reqs))
{
sourceGeometry->accept(*this);
rig->setSourceGeometry(sourceGeometry); rig->setSourceGeometry(sourceGeometry);
}
} }
else if (auto morph = dynamic_cast<SceneUtil::MorphGeometry*>(&drawable)) else if (auto morph = dynamic_cast<SceneUtil::MorphGeometry*>(&drawable))
{ {
osg::ref_ptr<osg::Geometry> sourceGeometry = morph->getSourceGeometry(); osg::ref_ptr<osg::Geometry> sourceGeometry = morph->getSourceGeometry();
if (sourceGeometry) if (sourceGeometry && adjustGeometry(*sourceGeometry, reqs))
{
sourceGeometry->accept(*this);
morph->setSourceGeometry(sourceGeometry); morph->setSourceGeometry(sourceGeometry);
}
} }
else if (auto osgaRig = dynamic_cast<SceneUtil::RigGeometryHolder*>(&drawable)) else if (auto osgaRig = dynamic_cast<SceneUtil::RigGeometryHolder*>(&drawable))
{ {
osg::ref_ptr<SceneUtil::OsgaRigGeometry> sourceOsgaRigGeometry = osgaRig->getSourceRigGeometry(); osg::ref_ptr<SceneUtil::OsgaRigGeometry> sourceOsgaRigGeometry = osgaRig->getSourceRigGeometry();
osg::ref_ptr<osg::Geometry> sourceGeometry = sourceOsgaRigGeometry->getSourceGeometry(); osg::ref_ptr<osg::Geometry> sourceGeometry = sourceOsgaRigGeometry->getSourceGeometry();
if (sourceGeometry) if (sourceGeometry && adjustGeometry(*sourceGeometry, reqs))
{ {
sourceGeometry->accept(*this);
sourceOsgaRigGeometry->setSourceGeometry(sourceGeometry); sourceOsgaRigGeometry->setSourceGeometry(sourceGeometry);
osgaRig->setSourceRigGeometry(sourceOsgaRigGeometry); osgaRig->setSourceRigGeometry(sourceOsgaRigGeometry);
} }