コード例 #1
0
 private static void EvalTexReference(SceneGraph sceneGraph, string texPath, Dictionary<string, SceneResourceReference> refCache, List<SceneResourceReference> matRefs)
 {
     Guard.NotNullOrEmpty(texPath);
     if (!string.IsNullOrWhiteSpace(texPath) && !refCache.ContainsKey(texPath))
     {
         var texRef = sceneGraph.CreateRef();
         texRef.Value = texPath;
         refCache.Add(texRef.Value, texRef);
         matRefs.Add(texRef);
     }
     else if (refCache.ContainsKey(texPath))
     {
         matRefs.Add(refCache[texPath]);
     }
 }