A vertex buffer is the mechanism via which the application specifies vertex data to the graphics hardware.


  • Create a new VertexBuffer instance.


    • graphicsDevice: GraphicsDevice

      The graphics device used to manage this vertex buffer.

    • format: VertexFormat

      The vertex format of this vertex buffer.

    • numVertices: number

      The number of vertices that this vertex buffer will hold.

    • Optional usage: number = BUFFER_STATIC

      The usage type of the vertex buffer (see BUFFER_*). Defaults to BUFFER_STATIC.

    • Optional initialData: ArrayBuffer

      Initial data.

    Returns VertexBuffer