Struct GorgonShaderMacro
A macro for a shader.
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public readonly struct GorgonShaderMacro : IGorgonNamedObject, IEquatable<GorgonShaderMacro>
Constructors
| Edit this page View SourceGorgonShaderMacro(string, string)
Initializes a new instance of the GorgonShaderMacro struct.
Declaration
public GorgonShaderMacro(string name, string value = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the macro. |
string | value | [Optional] The value for the macro. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
Properties
| Edit this page View SourceName
Property to return the name of the macro.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Value
Property to return the value for the macro.
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
object |
Methods
| Edit this page View SourceEquals(GorgonShaderMacro)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(GorgonShaderMacro other)
Parameters
Type | Name | Description |
---|---|---|
GorgonShaderMacro | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(in GorgonShaderMacro, in GorgonShaderMacro)
Function to determine if two instances are equal or not.
Declaration
public static bool Equals(in GorgonShaderMacro left, in GorgonShaderMacro right)
Parameters
Type | Name | Description |
---|---|---|
GorgonShaderMacro | left | Left instance to compare. |
GorgonShaderMacro | right | Right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
Equals(object)
Determines whether the specified object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to this instance; otherwise, false. |
Overrides
| Edit this page View SourceGetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
| Edit this page View SourceToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(GorgonShaderMacro, GorgonShaderMacro)
Operator to compare two instances for equality.
Declaration
public static bool operator ==(GorgonShaderMacro left, GorgonShaderMacro right)
Parameters
Type | Name | Description |
---|---|---|
GorgonShaderMacro | left | Left instance to compare. |
GorgonShaderMacro | right | Right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
operator !=(GorgonShaderMacro, GorgonShaderMacro)
Operator to compare two instances for inequality.
Declaration
public static bool operator !=(GorgonShaderMacro left, GorgonShaderMacro right)
Parameters
Type | Name | Description |
---|---|---|
GorgonShaderMacro | left | Left instance to compare. |
GorgonShaderMacro | right | Right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if not equal, false if equal. |