Struct LayoutElementDescription
This class represents a shader resource binding.
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct LayoutElementDescription
Constructors
LayoutElementDescription(uint, ResourceType, ShaderStages, bool, uint)
Initializes a new instance of the LayoutElementDescription struct.
Declaration
public LayoutElementDescription(uint slot, ResourceType type, ShaderStages stages, bool allowDynamicOffset = false, uint size = 0)
Parameters
Type | Name | Description |
---|---|---|
uint | slot | The resource slot. |
ResourceType | type | The resource type. |
ShaderStages | stages | The stages where this resource will be available. |
bool | allowDynamicOffset | Specifies whether to allow a dynamic offset. Only valid for Constant Buffers. |
uint | size | If greater than 0, it overrides the size of this resource (in bytes). Only valid for Constant Buffers. |
Fields
AllowDynamicOffset
Gets a value indicating whether this resource allows dynamic offset. It's used in some graphics backends to allow specifying dynamic offset.
Declaration
public readonly bool AllowDynamicOffset
Field Value
Type | Description |
---|---|
bool |
Range
If it is greater than 0, it overrides the size of this resource (in bytes). Valid only for Constant Buffers.
Declaration
public readonly uint Range
Field Value
Type | Description |
---|---|
uint |
Slot
Gets the resource slot.
Declaration
public readonly uint Slot
Field Value
Type | Description |
---|---|
uint |
Stages
Gets the resource's shader stage.
Declaration
public readonly ShaderStages Stages
Field Value
Type | Description |
---|---|
ShaderStages |
Type
Gets the shader resource type.
Declaration
public readonly ResourceType Type
Field Value
Type | Description |
---|---|
ResourceType |
Methods
Equals(LayoutElementDescription)
Returns a hash code for this instance.
Declaration
public bool Equals(LayoutElementDescription other)
Parameters
Type | Name | Description |
---|---|---|
LayoutElementDescription | other | The other object used for comparison. |
Returns
Type | Description |
---|---|
bool | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
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 |
|
Overrides
GetHashCode()
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
Operators
operator ==(LayoutElementDescription, LayoutElementDescription)
Implements the == operator.
Declaration
public static bool operator ==(LayoutElementDescription value1, LayoutElementDescription value2)
Parameters
Type | Name | Description |
---|---|---|
LayoutElementDescription | value1 | The first value. |
LayoutElementDescription | value2 | The second value. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(LayoutElementDescription, LayoutElementDescription)
Implements the operator ==.
Declaration
public static bool operator !=(LayoutElementDescription value1, LayoutElementDescription value2)
Parameters
Type | Name | Description |
---|---|---|
LayoutElementDescription | value1 | The first value. |
LayoutElementDescription | value2 | The second value. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |