CMapChunk::SelectMesh
function · terrain · orchestration
- Address
0x6beb50· 451 bytes, up to0x6bed12- Signature
void __thiscall (CMapChunk *this, uint32_t draw)- Meaning
- Keys a chunk's mesh by its and its finer neighbours' levels, refills it on change and draws it
- Confidence
- verified, proof one
- Finding
- terrain/lod#chunk-mesh-selection
Finding: Chunk mesh selection in terrain: lod
0x6beb50(draw) keys a chunk's mesh. The key is the level shifted by 16. With world flag 4 each of
the four neighbours (+0xc4 to +0xd0: y − 1, x + 1, y + 1 and x − 1 in the tile's chunk grid) of a strictly
higher level adds that level to the key shifted by 0, 4, 8 and 12, and to the caps word shifted by 0, 8, 16
and 24; a lower or equal neighbour adds nothing. A changed key invalidates both buffers and is stored at
+0xbc.
The derivation is in the doc.
Callers 1
- DrawChunkPass terrain
Callees 13
- 0x58a010 gx
- 0x58a100 gx
- 0x58a110 gx
- 0x58a130 gx
- GxVertexBufBind gx
- PassBufferToDevice gx
- AcquireChunkBuffers terrain
- CMapChunk::CopyLodVertices terrain
- CMapChunk::CopyLodIndices terrain
- CMapChunk::FillLodVertices terrain
- CMapChunk::FillLodIndices terrain
- CMapChunk::DrawLayers terrain
- BuildChunkIndices terrain
Calls and jumps by a bare address, from tables/calls.tsv.