benilla-re systems structs docs

CM2Model::BuildBatches

function · models · primitive

Address
0x711230 · 1346 bytes, up to 0x711771
Meaning
Builds an instance's own batch table and index buffer from its visible submeshes
Confidence
verified, proof one
Finding
models/model#own-batches

Finding: Own batches in models: the instance

BuildBatches gives an instance its own batch table when merging shrinks it: walking the selected view's texture units in order, it keeps each visible one and drops one that matches the last kept one in colour index, material, texture combination, transparency, texture transform and the submesh's first bone lookup. Only when some unit was dropped does it build the table, with its own index buffer and shader ids; otherwise the instance keeps none. Building first frees the old table and clears the instance's batchable flag +0xb8.

The derivation is in the doc.

Callers 2

Callees 8

Calls and jumps by a bare address, from tables/calls.tsv.