Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShaderMixinSource"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 public ShaderMixinSourceTree(ShaderMixinSourceTree parent)
 {
     Parent   = parent;
     Children = new Dictionary <string, ShaderMixinSourceTree>();
     Mixin    = new ShaderMixinSource();
 }
Example #2
0
        public void PushCompositionArray(ShaderMixinSource mixin, string compositionName, ShaderMixinSource composition)
        {
            int arrayIndex = mixin.AddCompositionToArray(compositionName, composition);

            compositionIndices.Push(compositionStringBuilder.Length);
            if (compositionString != null)
            {
                compositionStringBuilder.Insert(0, '.');
            }

            compositionStringBuilder.Insert(0, ']');
            compositionStringBuilder.Insert(0, arrayIndex);
            compositionStringBuilder.Insert(0, '[');
            compositionStringBuilder.Insert(0, compositionName);

            compositionString = compositionStringBuilder.ToString();
        }