draw

open fun draw(mvpMatrix: Array<Float>, color: Array<Float>, vertexBuffer: FloatBuffer, firstVertex: Int, vertexCount: Int, coordsPerVertex: Int, vertexStride: Int)

Issues the draw call. Does the full setup on every call.

Parameters

mvpMatrix

The 4x4 projection matrix.

color

A 4-element color vector.

vertexBuffer

Buffer with vertex data.

firstVertex

Index of first vertex to use in vertexBuffer.

vertexCount

Number of vertices in vertexBuffer.

coordsPerVertex

The number of coordinates per vertex (e.g. x,y is 2).

vertexStride

Width, in bytes, of the data for each vertex (often vertexCount * sizeof(float)).