Search Results for

    Show / Hide Table of Contents

    Class UploadBuffer

    This abstract class represents a strategy to quickly upload buffers to the GPU.

    Inheritance
    object
    UploadBuffer
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public abstract class UploadBuffer

    Constructors

    UploadBuffer(GraphicsContext, ulong, uint)

    Initializes a new instance of the UploadBuffer class.

    Declaration
    public UploadBuffer(GraphicsContext context, ulong size, uint align)
    Parameters
    Type Name Description
    GraphicsContext context

    The graphics context.

    ulong size

    The size of the upload buffer.

    uint align

    The alignment of the upload buffer, if needed.

    Fields

    Align

    The buffer alignment.

    Declaration
    public uint Align
    Field Value
    Type Description
    uint

    Count

    Number of batched buffers.

    Declaration
    public ulong Count
    Field Value
    Type Description
    ulong

    DataBegin

    Pointer to the beginning of the buffer.

    Declaration
    public ulong DataBegin
    Field Value
    Type Description
    ulong

    DataCurrent

    Points to the current buffer position.

    Declaration
    public ulong DataCurrent
    Field Value
    Type Description
    ulong

    DataEnd

    Pointer to the end of the buffer.

    Declaration
    public ulong DataEnd
    Field Value
    Type Description
    ulong

    TotalSize

    The total size in bytes of the upload buffer.

    Declaration
    public ulong TotalSize
    Field Value
    Type Description
    ulong

    context

    The instance of the graphics context.

    Declaration
    protected GraphicsContext context
    Field Value
    Type Description
    GraphicsContext

    Methods

    Allocate(ulong)

    Allocates the new data in the upload buffer.

    Declaration
    public ulong Allocate(ulong dataSize)
    Parameters
    Type Name Description
    ulong dataSize

    The new data size.

    Returns
    Type Description
    ulong

    The destination address to copy to.

    CalculateOffset(ulong)

    Gets the native address data offset.

    Declaration
    public ulong CalculateOffset(ulong address)
    Parameters
    Type Name Description
    ulong address

    The address of the data.

    Returns
    Type Description
    ulong

    The address data offset.

    Clear()

    Resets all pointers of the upload buffer.

    Declaration
    public void Clear()

    Dispose()

    Disposes all resources of this instance.

    Declaration
    public abstract void Dispose()

    RefreshBuffer(ulong)

    Refreshes the native buffer used by the upload buffer with the new size.

    Declaration
    protected abstract void RefreshBuffer(ulong size)
    Parameters
    Type Name Description
    ulong size

    The new size of the buffer.

    Extension Methods

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