CM2Shared::CreateBuffers
function · models · primitive
- Address
0x71dfa0· 69 bytes, up to0x71dfe4- Meaning
- Raises a shared model's instance copies for a batched run and frees its buffers to be rebuilt
- Confidence
- verified, proof one
- Finding
- models/shared#device-buffers
Finding: Device buffers in models: the shared model
The buffers hold +0x15c copies of the selected view, one per instance of a batched draw; a load
sets it to 1, and drawing a batched run of n raises it to n rounded up to 16, at most +0x160,
and frees the buffers to be rebuilt. Per copy the vertex buffer holds the vertices the view's lookup
names, in lookup order, 48 bytes each, their bone index bytes replaced by the view's palette bytes
plus copy · bones. Per submesh and copy the index buffer holds the submesh's triangle entries plus
copy · lookup count with shader ids, else the copy's vertex offset less the submesh's first
vertex; the submesh copy in +0x158 gets its run's start.
The derivation is in the doc.
Callers 1
- M2DrawBatchedRun models
Callees 1
- CM2Shared::FreeBuffers models
Calls and jumps by a bare address, from tables/calls.tsv.