From: Frederic Bouvier Date: Wed, 9 May 2012 21:31:06 +0000 (+0200) Subject: Allow to specify buffer name from parameters in effects X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6695b918eac95efb8a9025b6f36a8aeb9aa96dad;p=simgear.git Allow to specify buffer name from parameters in effects --- diff --git a/simgear/scene/material/TextureBuilder.cxx b/simgear/scene/material/TextureBuilder.cxx index 5ee5836a..a361fee1 100644 --- a/simgear/scene/material/TextureBuilder.cxx +++ b/simgear/scene/material/TextureBuilder.cxx @@ -849,7 +849,11 @@ Texture* GBufferBuilder::build(Effect* effect, Pass* pass, const SGPropertyNode* } else { SG_LOG(SG_INPUT, SG_ALERT, "no texture unit"); } - buffer = prop->getStringValue("name"); + const SGPropertyNode* nameProp = getEffectPropertyChild(effect, prop, + "name"); + if (!nameProp) + return 0; + buffer = nameProp->getStringValue(); pass->setBufferUnit( unit, buffer );