if (!predProp) {
setAlwaysValid(true);
} else {
+ setAlwaysValid(false);
try {
flightgear::PipelinePredParser parser;
SGExpressionb* validExp = dynamic_cast<SGExpressionb*>(parser.read(predProp->getChild(0)));
try {
result = boost::lexical_cast<T>(val);
} catch (boost::bad_lexical_cast &) {
- throw simgear::effect::BuilderException(string("findAttrOrHex: could not find attribute ")
- + string(val));
+ throw simgear::effect::BuilderException(std::string("findAttrOrHex: could not find attribute ")
+ + std::string(val));
}
}
}
};
simgear::effect::EffectPropertyMap<osg::Camera::BufferComponent> components(componentsInit);
-FGRenderingPipeline::Stage::Stage(SGPropertyNode* prop)
+FGRenderingPipeline::Pass::Pass(SGPropertyNode* prop)
{
SGPropertyNode_ptr nameProp = prop->getChild("name");
if (!nameProp.valid()) {
- throw sg_exception("Stage name is mandatory");
+ throw sg_exception("Pass name is mandatory");
}
name = nameProp->getStringValue();
SGPropertyNode_ptr typeProp = prop->getChild("type");
orderNum = prop->getIntValue("order-num", -1);
effect = prop->getStringValue("effect", "");
+ debugProperty = prop->getStringValue("debug-property", "");
+
+ parseCondition(prop);
+}
+
+FGRenderingPipeline::Stage::Stage(SGPropertyNode* prop) : Pass(prop)
+{
needsDuDv = prop->getBoolValue("needs-du-dv", false);
scaleFactor = prop->getFloatValue("scale-factor", 1.f);
this->attachments.push_back(new FGRenderingPipeline::Attachment(attachments[i]));
}
- parseCondition(prop);
+ std::vector<SGPropertyNode_ptr> passes = prop->getChildren("pass");
+ for (int i = 0; i < (int)passes.size(); ++i) {
+ this->passes.push_back(new FGRenderingPipeline::Pass(passes[i]));
+ }
}
FGRenderingPipeline::Attachment::Attachment(SGPropertyNode* prop)