API reference
Preparing search index…

VertexBuffer

GPU storage owned by Native; draw records a handle without uploading vertices.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory18

Constructors

Properties

Methods

Constructors

Properties

Usage: typeof VertexBufferUsage = VertexBufferUsage

Vertex buffer usage enumeration.

Source & inheritance

Methods

  • Allocates the specified number of vertices on the GPU and returns success; submits previously queued draws.

    Parameters

    vertexCount
    number

    Returns

    boolean
    Source & inheritance
  • Returns the OpenGL buffer identifier, or 0 if not yet allocated.

    Returns

    number
    Source & inheritance
  • Uploads data for the current buffer's vertex count; the source must contain enough vertices. Returns whether it succeeded.

    Parameters

    vertices
    Vertices

    Returns

    boolean
    Source & inheritance
  • Uploads vertexCount vertices from the start of the source to offset (in vertices); returns whether it succeeded.

    Parameters

    vertices
    Vertices
    vertexCount
    number
    offset
    number

    Returns

    boolean
    Source & inheritance
  • Copies source's GPU vertex data and returns whether it succeeded.

    Parameters

    Returns

    boolean
    Source & inheritance
  • Returns whether the current environment supports GPU vertex buffers.

    Returns

    boolean
    Source & inheritance

Symbol members

"[graphicsNative]": NativeGraphicsHandle<"vertexBuffer">
Source & inheritance
"[vertexBufferId]": number
Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0