Renders mesh batches.

Owned by a ViewManager.

RenderManager is responsible for:

  • Translating MeshBatch state into concrete WebGL draw calls
  • Managing GPU state (depth, blending, culling) across render phases
  • Executing multi-pass rendering (opaque, transparent, edges, x-ray, highlight, selection)
  • Binding draw programs via DrawOps

Rendering is performed in phases:

  1. Opaque geometry
  2. Opaque edges
  3. X-ray / highlighted / selected silhouettes (opaque)
  4. Transparent geometry & edges (with blending)
  5. X-ray / highlighted / selected silhouettes (transparent)

Meshes are grouped into bins per phase to ensure correct ordering and minimal GPU state changes.

  • Uses a shared DrawOps pool to reduce shader/program churn.
  • Assumes a maximum of 4 views (indexed via View.viewIndex).
  • GPU state cleanup is performed explicitly at the end of each render.

Constructors

Properties

Methods

Constructors

Properties

drawOps: DrawOps

Active drawing operations (shader programs + draw routines).

Populated during init and returned to the pool during destroy.

Used internally, but made public to support diagnostics and testing.

Methods