Class ShaderMixinSource
A mixin performing a combination of ShaderClassCode and other mixins.
[DataContract("ShaderMixinSource")]
public sealed class ShaderMixinSource : ShaderSource, IEquatable<ShaderMixinSource>
- Inheritance
-
ShaderMixinSource
- Implements
- Inherited Members
Constructors
ShaderMixinSource()
Initializes a new instance of the ShaderMixinSource class.
public ShaderMixinSource()
Properties
Compositions
Gets or sets the compositions.
[DataMember(20)]
public SortedList<string, ShaderSource> Compositions { get; set; }
Property Value
- SortedList<string, ShaderSource>
The compositions.
Macros
Gets or sets the macros.
[DataMember(30)]
public List<ShaderMacro> Macros { get; set; }
Property Value
- List<ShaderMacro>
The macros.
Mixins
Gets or sets the mixins.
[DataMember(10)]
public List<ShaderClassCode> Mixins { get; set; }
Property Value
- List<ShaderClassCode>
The mixins.
Name
Gets or sets the name of the sdfx effect linked to this node.
[DataMember(0)]
public string Name { get; set; }
Property Value
- string
The name of the sdfx effect.
Parent
public ShaderMixinSource Parent { get; set; }
Property Value
Methods
AddComposition(string, ShaderSource)
Adds a composition to this mixin.
public void AddComposition(string name, ShaderSource shaderSource)
Parameters
name
stringThe name.
shaderSource
ShaderSourceThe shader source.
AddCompositionToArray(string, ShaderSource)
Adds a composition to this mixin.
public int AddCompositionToArray(string name, ShaderSource shaderSourceElement)
Parameters
name
stringThe name.
shaderSourceElement
ShaderSourceThe shader source element.
Returns
- int
Returns the index of the composition in the array.
AddMacro(string, object)
Adds a macro to this mixin.
public void AddMacro(string name, object value)
Parameters
Clone()
Deep clones this instance.
public override object Clone()
Returns
- object
A new instance.
CloneFrom(ShaderMixinSource)
Clones from the specified ShaderMixinSource.
public void CloneFrom(ShaderMixinSource parent)
Parameters
parent
ShaderMixinSourceThe parent mixin to clone from.
Exceptions
- ArgumentNullException
parent
DeepCloneFrom(ShaderMixinSource)
Clones from the specified ShaderMixinSource. Clones members too.
public void DeepCloneFrom(ShaderMixinSource parent)
Parameters
parent
ShaderMixinSourceThe parent mixin to clone from.
Exceptions
- ArgumentNullException
parent
Equals(ShaderMixinSource)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ShaderMixinSource other)
Parameters
other
ShaderMixinSourceAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to this instance.
public override bool Equals(object against)
Parameters
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.