draw method

  1. @override
void draw(
  1. Mesh mesh
)
override

Draws a triangle list with indices.

Implementation

@override
void draw(Mesh mesh) {
  if (mesh is! _OGLMesh) return; // Error handling.

  glBindVertexArray(mesh._vaoHandle);

  gldtDrawElements(GL_TRIANGLES, mesh.indexCount, GL_UNSIGNED_INT, 0);

  glBindVertexArray(0);
}