constructor() {
    /**
     * @private
     */
    this.globalCounter_ = 0;

    /**
     * Refs are used as keys for hit detection.
     * @type {Map<number, Feature|RenderFeature>}
     * @private
     */
    this.refToFeature_ = new Map();

    /**
     * Features are split in "entries", which are individual geometries. We use the following map to share a single ref for all those entries.
     * @type {Map<string, number>}
     * @private
     */
    this.uidToRef_ = new Map();

    /**
     * The precision in WebGL shaders is limited.
     * To keep the refs as small as possible we maintain an array of freed up references.
     * @type {Array<number>}
     * @private
     */
    this.freeGlobalRef_ = [];

    /**
     * @type {PolygonGeometryBatch}
     */
    this.polygonBatch = {
      entries: {},
      geometriesCount: 0,
      verticesCount: 0,
      ringsCount: 0,
    };

    /**
     * @type {PointGeometryBatch}
     */
    this.pointBatch = {
      entries: {},
      geometriesCount: 0,
    };

    /**
     * @type {LineStringGeometryBatch}
     */
    this.lineStringBatch = {
      entries: {},
      geometriesCount: 0,
      verticesCount: 0,
    };
  }
@classdesc This class is used to group several geometries of various types together for faster rendering.
Three inner batches are maintained for polygons, lines and points. Each time a feature is added, changed or removed
from the batch, these inner batches are modified accordingly in order to keep them up-to-date.

A feature can be present in several inner batches, for example a polygon geometry will be present in the polygon batch
and its linear rings will be present in the line batch. Multi geometries are also broken down into individual geometries
and added to the corresponding batches in a recursive manner.

Corresponding {@link module:ol/render/webgl/BatchRenderer} instances are then used to generate the render instructions
and WebGL buffers (vertices and indices) for each inner batches; render instructions are stored on the inner batches,
alongside the transform used to convert world coords to screen coords at the time these instructions were generated.
The resulting WebGL buffers are stored on the batches as well.

An important aspect of geometry batches is that there is no guarantee that render instructions and WebGL buffers
are synchronized, i.e. render instructions can describe a new state while WebGL buffers might not have been written yet.
This is why two world-to-screen transforms are stored on each batch: one for the render instructions and one for
the WebGL buffers.