A collection of attribute state; a vertex attribute array.

Hierarchy

  • VAO

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a vertex array object.

    Parameters

    • program: Program

      The program that the VAO is used with.

    • attributes: AttributeState[] = []

      The attributes associated with the VAO.

    • Optional indices: Uint8Array

      The indices to supply to the element array buffer of this VAO if the data should be indexed.

    Returns VAO

Properties

gl: WebGL2RenderingContext

The rendering context of this VAO.

program: Program

The program that this VAO is used with.

vao: WebGLVertexArrayObject

The WebGL API interface of this VAO.

Accessors

  • get indices(): undefined | Uint8Array
  • The indices in the element array buffer of this VAO if the data is indexed.

    Returns undefined | Uint8Array

  • set indices(value: undefined | Uint8Array): void
  • Parameters

    • value: undefined | Uint8Array

    Returns void

Methods

  • Rasterizes the vertex data stored in this VAO.

    Parameters

    • Optional uniforms: UniformSource

      A map of uniform variable names to their values to use when rasterizing.

    • primitive: Primitive = Primitive.TRIANGLES

      The type of primitive to rasterize.

    • offset: number = 0

      The number of elements to skip when rasterizing arrays.

    Returns void

Generated using TypeDoc