Search Results for

    Show / Hide Table of Contents

    Class GPUVertexLayout

    Defines input layout of vertex buffer data passed to the Vertex Shader.

    Inheritance
    System.Object
    Object
    GPUResource
    GPUVertexLayout
    Inherited Members
    GPUResource.ReleaseGPU()
    GPUResource.ResourceType
    GPUResource.MemoryUsage
    GPUResource.Name
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public sealed class GPUVertexLayout : GPUResource

    Constructors

    GPUVertexLayout()

    Initializes a new instance of the GPUVertexLayout.

    Declaration
    public GPUVertexLayout()

    Properties

    Elements

    Gets the list of elements used by this layout.

    Declaration
    [Unmanaged]
    public VertexElement[] Elements { get; }
    Property Value
    VertexElement[]

    ElementsString

    Gets the list of elements used by this layout as a text (each element in a new line).

    Declaration
    [Unmanaged]
    public string ElementsString { get; }
    Property Value
    System.String

    Stride

    Gets the size in bytes of all elements in the layout structure (including their offsets).

    Declaration
    [Unmanaged]
    public uint Stride { get; }
    Property Value
    System.UInt32

    Methods

    FindElement(VertexElement.Types)

    Searches for a given element type in a layout.

    Declaration
    [Unmanaged]
    public VertexElement FindElement(VertexElement.Types type)
    Parameters
    VertexElement.Types type

    The type of element to find.

    Returns
    VertexElement

    Found element with properties or empty if missing.

    Get(GPUBuffer[])

    Gets the vertex layout for a given list of vertex buffers (sequence of binding slots based on layouts set on those buffers). Uses internal cache to skip creating layout if it's already exists for a given list.

    Declaration
    [Unmanaged]
    public static GPUVertexLayout Get(GPUBuffer[] vertexBuffers)
    Parameters
    GPUBuffer[] vertexBuffers

    The list of vertex buffers for the layout.

    Returns
    GPUVertexLayout

    Vertex layout object. Doesn't need to be cleared as it's cached for an application lifetime.

    Get(GPUVertexLayout[])

    Merges list of layouts in a single one. Uses internal cache to skip creating layout if it's already exists for a given list.

    Declaration
    [Unmanaged]
    public static GPUVertexLayout Get(GPUVertexLayout[] layouts)
    Parameters
    GPUVertexLayout[] layouts

    The list of layouts to merge.

    Returns
    GPUVertexLayout

    Vertex layout object. Doesn't need to be cleared as it's cached for an application lifetime.

    Get(VertexElement[], Boolean)

    Gets the vertex layout for a given list of elements. Uses internal cache to skip creating layout if it's already exists for a given list.

    Declaration
    [Unmanaged]
    public static GPUVertexLayout Get(VertexElement[] elements, bool explicitOffsets = false)
    Parameters
    VertexElement[] elements

    The list of elements for the layout.

    System.Boolean explicitOffsets

    If set to true, input elements offsets will be used without automatic calculations (offsets with value 0).

    Returns
    GPUVertexLayout

    Vertex layout object. Doesn't need to be cleared as it's cached for an application lifetime.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat