Search Results for

    Show / Hide Table of Contents

    Class GPUVertexLayout

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

    Inheritance
    Object
    ScriptingObject
    GPUResource
    GPUVertexLayout
    Inherited Members
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    GPUResource::_memoryUsage
    GPUResource::_nameCapacity
    GPUResource::_namePtr
    GPUResource::_nameSize
    ScriptingObject::_type
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ScriptingObject::DestroyManaged()
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    GPUResource::GetMemoryUsage()
    GPUResource::GetName()
    ScriptingObject::GetOrCreateManagedInstance()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    GPUResource::GPUResource()
    GPUResource::GPUResource(const SpawnParams& params)
    ScriptingObject::HasManagedInstance()
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    ScriptingObject::IsRegistered()
    GPUResource::LastRenderTime
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    GPUResource::OnDeleteObject()
    GPUResource::OnDeviceDispose()
    ScriptingObject::OnManagedInstanceDeleted()
    GPUResource::OnReleaseGPU()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    GPUResource::ReleaseGPU()
    GPUResource::Releasing
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    GPUResource::SetName(const StringView& name)
    GPUVertexLayout
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    GPUResource::ToString()
    ScriptingObject::UnregisterObject()
    GPUResource::~GPUResource()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Shaders/GPUVertexLayout.h
    Syntax
    public class GPUVertexLayout : public GPUResource

    Constructors

    GPUVertexLayout()

    Declaration
    protected GPUVertexLayout()

    Methods

    FindElement(VertexElement::Types type)

    Searches for a given element type in a layout.

    Declaration
    public VertexElement FindElement(VertexElement::Types type) const
    Parameters
    VertexElement::Types type

    The type of element to find.

    Returns
    VertexElement

    Found element with properties or empty if missing.

    Get(const Array<VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>>& elements, bool explicitOffsets=false)

    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
    public static GPUVertexLayout* Get(const Array<VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>>& elements, bool explicitOffsets=false)
    Parameters
    Array<VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>> elements

    The list of elements for the layout.

    bool 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.

    Get(const Span<GPUBuffer* >& vertexBuffers)

    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
    public static GPUVertexLayout* Get(const Span<GPUBuffer* >& vertexBuffers)
    Parameters
    Span<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(const Span<GPUVertexLayout* >& layouts)

    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
    public static GPUVertexLayout* Get(const Span<GPUVertexLayout* >& layouts)
    Parameters
    Span<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.

    GetElements()

    Gets the list of elements used by this layout.

    Declaration
    public Array<VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>> GetElements() const
    Returns
    Array<VertexElement, FixedAllocation<GPU_MAX_VS_ELEMENTS>>

    GetElementsString()

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

    Declaration
    public String GetElementsString() const
    Returns
    String

    GetResourceType()

    Gets the GPU resource type.

    Declaration
    public virtual GPUResourceType GetResourceType() const override
    Returns
    GPUResourceType

    Overrides
    GPUResource::GetResourceType()

    GetStride()

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

    Declaration
    public uint32 GetStride() const
    Returns
    uint32

    Merge(GPUVertexLayout* base, GPUVertexLayout* reference, bool removeUnused=false, bool addMissing=true, int32 missingSlotOverride=-1)

    Merges reference vertex elements into the given set of elements to ensure the reference list is satisfied (vertex shader input requirement). Returns base layout if it's valid.

    Declaration
    public static GPUVertexLayout* Merge(GPUVertexLayout* base, GPUVertexLayout* reference, bool removeUnused=false, bool addMissing=true, int32 missingSlotOverride=-1)
    Parameters
    GPUVertexLayout base

    The list of vertex buffers for the layout.

    GPUVertexLayout reference

    The list of reference inputs.

    bool removeUnused

    True to remove elements from base layout that don't exist in a reference layout.

    bool addMissing

    True to add missing elements to base layout that exist in a reference layout.

    int32 missingSlotOverride

    Allows to override the input slot for missing elements. Use value -1 to inherit slot from the reference layout.

    Returns
    GPUVertexLayout

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

    SetElements(const Elements& elements, bool explicitOffsets)

    Declaration
    protected void SetElements(const Elements& elements, bool explicitOffsets)
    Parameters
    Elements elements

    bool explicitOffsets

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat