Documentation
    Preparing search index...

    The batcher plus the GL objects its output is drawn from — see the module header.

    One per renderer. Holds no scene state: between frames it retains its two buffers, its vertex array, and the planner's staging arrays.

    Implements

    Index
    • Uploads batch and issues its single draw call, leaving the batch's vertex array bound (the renderer binds a geometry's array before its next ordinary draw, exactly as it does after a particle system's).

      Uniform state — the model matrix (identity: positions arrive in world space), the colour, and the two feature switches — is uploaded here through program, so a caller that never links this module never links those calls either. Everything a caller shares with the ordinary draw path — the program switch, §57's render state, the texture bind — stays with the caller.

      Parameters

      • gl: BatchGlContext
      • program: UnlitProgram
      • batch: RenderBatch
      • useMap: boolean

        whether a texture is bound for this draw; false makes the batch draw untextured, which is the same outcome an unlit item with an unresolvable map has.

      Returns void

      nothing; the caller counts the draw (§84) from batch.indexCount.

    • Plans and assembles the batch starting at items[from], or null when that item does not start one. See @fourjs/render's RenderBatcher.next: the returned record is pooled and valid until the next call.

      layerMask is optional since R-8 (2026-08-09), and the renderer no longer passes one: it hands this method a list buildViewRenderList has already reduced to what the view draws, so the mask would be vacuous. Omitting it means every layer, which is what a pre-filtered list needs. It stays in the signature for a caller that batches over an unfiltered frame list, where a masked-out item must still end a run.

      Parameters

      • items: readonly RenderItem[]
      • from: number
      • OptionallayerMask: number

      Returns RenderBatch | null