draw

open fun draw(mvpMatrix: Array<Float>, vertexBuffer: FloatBuffer, firstVertex: Int, vertexCount: Int, coordsPerVertex: Int, vertexStride: Int, texMatrix: Array<Float>, texBuffer: FloatBuffer, textureId: Int, texStride: Int)

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

Parameters

mvpMatrix

The 4x4 projection matrix.

vertexBuffer

Buffer with vertex position 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 position data for each vertex (often vertexCount * sizeof(float)).

texMatrix

A 4x4 transformation matrix for texture coords. (Primarily intended for use with SurfaceTexture.)

texBuffer

Buffer with vertex texture data.

texStride

Width, in bytes, of the texture data for each vertex.