4 using System.Runtime.InteropServices;
5 using SiliconStudio.Core;
6 using SiliconStudio.Core.Serialization;
8 namespace SiliconStudio.
Paradox.Shaders
13 [StructLayout(LayoutKind.Sequential, Pack = 4)]
25 this.Definition = definition == null ?
"" : definition.ToString();
31 [MarshalAs(UnmanagedType.LPStr)]
37 [MarshalAs(UnmanagedType.LPStr)]
49 return Equals(other.
Name, Name) && Equals(other.
Definition, Definition);
59 public override bool Equals(
object obj)
61 if (ReferenceEquals(null, obj))
return false;
62 if (obj.GetType() != typeof(
ShaderMacro))
return false;
76 return ((Name != null ? Name.GetHashCode() : 0) * 397) ^ (Definition != null ? Definition.GetHashCode() : 0);
override bool Equals(object obj)
Determines whether the specified System.Object is equal to this instance.
string Definition
Value of the macro to set.
ShaderMacro(string name, object definition)
Initializes a new instance of the ShaderMacro struct.
override int GetHashCode()
Returns a hash code for this instance.
string Name
Name of the macro to set.
bool Equals(ShaderMacro other)
Indicates whether the current object is equal to another object of the same type. ...