/// <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); } } }
/// <summary> /// Creates a new, empty BatchInfo. /// </summary> public BatchInfo() { this.parameters = new ShaderParameterCollection(); }
/// <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); }