flush method
void
flush()
Implementation
void flush() {
if (renderBufferIndex.position > 0 && renderBufferVertex.position > 0) {
final count = renderBufferIndex.position;
renderBufferIndex.update();
renderBufferIndex.position = 0;
renderBufferIndex.count = 0;
renderBufferVertex.update();
renderBufferVertex.position = 0;
renderBufferVertex.count = 0;
renderingContext.drawElements(
gl.WebGL.TRIANGLES, count, gl.WebGL.UNSIGNED_SHORT, 0);
renderStatistics.drawCount += 1;
}
}