Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ShaderMixinSourceTreeExtensions.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 
5 namespace SiliconStudio.Paradox.Shaders
6 {
7  /// <summary>
8  /// Extensions for <see cref="ShaderMixinSourceTree"/>
9  /// </summary>
10  public static class ShaderMixinSourceTreeExtensions
11  {
12  /// <summary>
13  /// Adds the specified mixin source tree to the children of a <see cref="ShaderMixinSourceTree"/>.
14  /// </summary>
15  /// <param name="mixinSourceTreeChildren">The mixin source tree children.</param>
16  /// <param name="sourceTree">The source tree.</param>
17  public static void Add(this Dictionary<string, ShaderMixinSourceTree> mixinSourceTreeChildren, ShaderMixinSourceTree sourceTree)
18  {
19  // Overrides instead of adding so we can override children tree
20  // TODO: This is not an optimized scenario, as it requires to instantiate a new ShaderMixinSourceTree
21  mixinSourceTreeChildren[sourceTree.Name] = sourceTree;
22  }
23  }
24 }
static void Add(this Dictionary< string, ShaderMixinSourceTree > mixinSourceTreeChildren, ShaderMixinSourceTree sourceTree)
Adds the specified mixin source tree to the children of a ShaderMixinSourceTree.