Beispiel #1
0
 /// <summary>
 /// Initializes this <see cref="BatchInfo"/> instance to match the specified
 /// target instance exactly, e.g. use the same <see cref="Technique"/> and
 /// specify the same shader parameter values.
 /// </summary>
 /// <param name="target"></param>
 public void InitFrom(BatchInfo source)
 {
     this.Reset();
     this.technique = source.technique;
     if (source.parameters != null)
     {
         if (this.parameters == null)
         {
             this.parameters = new ShaderParameterCollection(source.parameters);
         }
         else
         {
             source.parameters.CopyTo(this.parameters);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// Creates a new, empty BatchInfo.
 /// </summary>
 public BatchInfo()
 {
     this.parameters = new ShaderParameterCollection();
 }
Beispiel #3
0
 /// <summary>
 /// Assigns all shader variables in batch.
 /// </summary>
 /// <param name="variables"></param>
 /// <seealso cref="ShaderParameterCollection.CopyTo"/>
 public void SetVariables(ShaderParameterCollection variables)
 {
     variables.CopyTo(this.parameters);
 }