]> git.mxchange.org Git - simgear.git/commitdiff
Allow to specify buffer name from parameters in effects
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 9 May 2012 21:31:06 +0000 (23:31 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Fri, 11 May 2012 22:16:19 +0000 (00:16 +0200)
simgear/scene/material/TextureBuilder.cxx

index 5ee5836a38fd786eeaab8bb4d6e2b80ef252cccd..a361fee1ab8e8cc5ebb508a7cfef3e14be14169f 100644 (file)
@@ -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 );