@lakuna/ugl
    Preparing search index...

    Class VertexBuffer

    An array of binary data to be used as a vertex buffer object.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Create a buffer to be used as anything other than an element array buffer.

      Parameters

      • context: Context

        The rendering context.

      • data: number | ArrayBufferView<ArrayBufferLike> | VertexBuffer = 0

        The initial data contained in this buffer or the size of this buffer's data store in bytes.

      • Optionalusage: BufferUsage

        The intended usage of the buffer.

      • Optionaloffset: number

        The index of the element to start reading the initial data at.

      • Optionallength: number

        The length of the initial data to read into the buffer.

      Returns VertexBuffer

      UnsupportedOperationError if a buffer cannot be created.

    Properties

    context: Context

    The rendering context.

    Accessors

    Methods

    • Set the size of this buffer, clearing its data.

      Parameters

      • data: number | ArrayBufferView<ArrayBufferLike> | VertexBuffer

        The size to set this buffer's data store to in bytes.

      • Optionalusage: BufferUsage

        The intended use case of the buffer.

      • OptionalsrcOffset: number
      • Optionallength: number
      • OptionaldstOffset: number

      Returns void