Documentation
    Preparing search index...

    Class WgpuBatching

    The batcher plus the per-slot GPU buffers its output is drawn from — see the module header. One per renderer; holds no scene state.

    Implements

    Index
    • get disposed(): boolean

      Whether WgpuBatching.dispose has run. Disposal is terminal (§83): a disposed uploader refuses its per-frame entry points with INVALID_APPLICATION_STATE (§89) rather than silently working.

      Returns boolean

    • Resets the frame's slot counter (see the module header) — called once per frame by the renderer, before any view is recorded. A renderer with batching: null calls nothing at all, which is the byte-identity half of the contract.

      Returns void

    • Destroys the GPU handles on a live device (§83).

      Returns void

    • Uploads batch into this frame's next slot and records its single indexed draw into pass — the vertex-buffer bind, the index-buffer bind and the drawIndexed.

      Everything a draw shares with the ordinary path stays with the caller: the pipeline, the group-0 uniform block (identity model — positions arrive in world space — and the batch's colour), the group-1 texture bind, the stencil reference, and §84's counting. A later ordinary draw needs no restore: vertex and index bindings are re-issued per draw on this backend anyway, which is one more place the pass-command model is structurally safer than GL's ambient state.

      Parameters

      Returns void

    • Drops the GPU handles without touching the device (§61 device loss).

      Returns void

    • Plans and assembles the batch starting at items[from], or null when that item does not start one — RenderBatcher.next, forwarded verbatim, layerMask included for gl-batch.ts's recorded reason (the renderer no longer passes one over a pre-filtered view list; a caller batching an unfiltered frame list still may).

      Parameters

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

      Returns RenderBatch | null