Mvt Batched Polygon Tile
Batched polygon-fill renderable for one MVT slippy tile.
One VBO + one EBO per Globe.State, regardless of polygon count. Triangles are grouped by (zOrder, colorPacked) and one DrawShapeState.drawElements call is issued per bucket. Buffer keys are shared across buckets so sub-draws don't allocate extra GL buffers.
Scope:
POLYGON features only. LINESTRING features go through MvtBatchedLineTile; POINT features become earth.worldwind.shape.Labels.
Surface-clamped via DrawableSurfaceShape — same compositing pipeline as
altitudeMode = CLAMP_TO_GROUND, isFollowTerrain = trueon earth.worldwind.shape.Polygon. Vertex altitudes are baked at 0 m; the compositor projects to terrain.
Each feature's outer ring + holes are triangulated by earcut (ear-clipping) — the triangulator Mapbox/MapLibre use for MVT fills; far cheaper than a GLU sweep-line tessellator (no half-edge mesh allocation). earcut normalises winding itself, so input rings need no particular orientation.
Constructors
Types
One polygon feature pre-resolved into rings + style attributes. MvtVectorLayer builds this list off-thread during the tile fetch; MvtBatchedPolygonTile.assembleGeometry then turns it into GPU-friendly geometry on the render thread.
Properties
Approximate GPU byte footprint (VBO + EBO) for LRU byte-weighting. Once assembled it's the exact array bytes; before assembly it estimates from source vertex counts (VERTEX_STRIDE floats/vertex for the VBO + ~3 triangle indices/vertex for the EBO, 4 bytes each).
Functions
Pre-assemble this tile's geometry off the render thread (one assembler per instance at a time). doRender lazy-assembles as a fallback. globe/globeState are unused — vertices are degree-space, so one assembly serves every globe state; kept for call-site symmetry.
Drop this tile's GL buffer entries from earth.worldwind.render.RenderResourceCache for every cached globe state. Called by MvtVectorLayer on LRU eviction so the kernel reclaims GPU pages eagerly instead of waiting for cache pressure.