A MeshBatchImpl manages a batch of SceneMeshes that use the same primitive type.

Implements

Constructors

Properties

gpuMemoryBatchIndex: number

The index of this batch in the GPUMemoryManager system.

numIndices: number

The total number of indices in all meshes of this batch. This is used with WebGL render calls to determine how many indices to render when drawing this batch.

numVertices: number

The total number of vertices in all meshes of this batch. This is used for various calculations and optimizations related to rendering.

primBaseIndex: number

Base primitive tileIndex for this batch.

primitive: number

Primitive type of the meshes in this batch.

saoSupported: boolean

Whether this batch supports Screen Space Ambient Occlusion (SSAO) rendering.

sortId: string

A unique identifier for sorting this batch in the renderer.

Accessors

Methods

  • Checks if there are any meshes in this batch that should be rendered in the specified render pass for the given view.

    Parameters

    • viewIndex: number

      The index of the view to check.

    • renderPass: number

      The render pass to check for (e.g., opaque, transparent).

    Returns boolean

    True if there are meshes to render in the specified pass, false otherwise.