Search Results for

    Show / Hide Table of Contents

    Class LayoutDescription

    A generic description of vertex inputs to the device's input assembler stage. This object describes the inputs from a single vertex buffer.

    Inheritance
    object
    LayoutDescription
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public class LayoutDescription
    Remarks

    Shaders can use inputs from multiple vertex buffers.

    Constructors

    LayoutDescription(VertexStepFunction, uint)

    Initializes a new instance of the LayoutDescription class.

    Declaration
    public LayoutDescription(VertexStepFunction stepFunction = VertexStepFunction.PerVertexData, uint stepRate = 0)
    Parameters
    Type Name Description
    VertexStepFunction stepFunction

    The frequency at which the vertex function fetches attribute data.

    uint stepRate

    The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data.

    Fields

    Elements

    A collection of individual vertex elements comprising a single vertex.

    Declaration
    public List<ElementDescription> Elements
    Field Value
    Type Description
    List<ElementDescription>

    StepFunction

    The frequency with which the vertex function fetches attribute data.

    Declaration
    public VertexStepFunction StepFunction
    Field Value
    Type Description
    VertexStepFunction

    StepRate

    A value controlling how often data for instances is updated for this layout. For per-vertex elements, this value should be 0.

    Declaration
    public int StepRate
    Field Value
    Type Description
    int

    Stride

    The total size of an individual vertex in bytes.

    Declaration
    public uint Stride
    Field Value
    Type Description
    uint

    Methods

    Add(ElementDescription)

    Adds a new ElementDescription to the layout.

    Declaration
    public LayoutDescription Add(ElementDescription element)
    Parameters
    Type Name Description
    ElementDescription element

    Element description.

    Returns
    Type Description
    LayoutDescription

    My own instance.

    Equals(LayoutDescription)

    Returns a hash code for this instance.

    Declaration
    public bool Equals(LayoutDescription other)
    Parameters
    Type Name Description
    LayoutDescription other

    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

    true if the specified object is equal to this instance; otherwise, false.

    Overrides
    object.Equals(object)

    GetFormatSizeInBytes(ElementFormat)

    Gets the size in bytes of a specific vertex element format.

    Declaration
    public static uint GetFormatSizeInBytes(ElementFormat format)
    Parameters
    Type Name Description
    ElementFormat format

    The vertex element format.

    Returns
    Type Description
    uint

    The size in bytes.

    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 such as a hash table.

    Overrides
    object.GetHashCode()

    Read(BinaryReader)

    Reads LayoutDescription from a binary file.

    Declaration
    public static LayoutDescription Read(BinaryReader reader)
    Parameters
    Type Name Description
    BinaryReader reader

    The binary reader.

    Returns
    Type Description
    LayoutDescription

    The read layoutDescription.

    Write(BinaryWriter)

    Writes LayoutDescription into a binary file.

    Declaration
    public void Write(BinaryWriter writer)
    Parameters
    Type Name Description
    BinaryWriter writer

    The binary writer.

    Operators

    operator ==(LayoutDescription, LayoutDescription)

    Implements the operator ==.

    Declaration
    public static bool operator ==(LayoutDescription value1, LayoutDescription value2)
    Parameters
    Type Name Description
    LayoutDescription value1

    The first value.

    LayoutDescription value2

    The second value.

    Returns
    Type Description
    bool

    The result of the operation.

    operator !=(LayoutDescription, LayoutDescription)

    Implements the operator ==.

    Declaration
    public static bool operator !=(LayoutDescription value1, LayoutDescription value2)
    Parameters
    Type Name Description
    LayoutDescription value1

    The first value.

    LayoutDescription value2

    The second value.

    Returns
    Type Description
    bool

    The result of the operator.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX