Store material data with Effect

Somehow this got left out, which broke ground intersection queries.
This commit is contained in:
Tim Moore
2009-07-17 16:16:25 +02:00
parent fcf72a7123
commit 828d561113

View File

@@ -246,6 +246,7 @@ void SGMaterial::buildEffectProperties(const osgDB::ReaderWriter::Options*
options)
{
using namespace osg;
ref_ptr<SGMaterialUserData> user = new SGMaterialUserData(this);
SGPropertyNode_ptr propRoot = new SGPropertyNode();
makeChild(propRoot, "inherits-from")->setStringValue(effect);
SGPropertyNode* paramProp = makeChild(propRoot, "parameters");
@@ -277,6 +278,7 @@ void SGMaterial::buildEffectProperties(const osgDB::ReaderWriter::Options*
makeChild(tex2dProp, "wrap-t")
->setStringValue(wrapv ? "repeat" : "clamp");
matState.effect = makeEffect(effectProp, false, options);
matState.effect->setUserData(user.get());
}
}