benilla-re systems structs docs

GxVertexBufBind

function · gx · orchestration

Address
0x58a7c0 · 54 bytes, up to 0x58a7f5
Signature
void __fastcall (void *buffer, uint32_t format)
Meaning
Binds a buffer as the vertex stream with a vertex format id, setting its mask, stride and stream
Confidence
verified, proof one
Finding
gx/draw#vertex-formats

Finding: Vertex formats in gx: drawing

Thirteen formats are 16-byte records at 0x809c00: descriptor pointer, element count, stride, and a mask of components. Mask bit 0 is position (12 bytes), bit 3 normal (12), bit 4 colour (4, a packed dword), bit 5 first texture coordinate (8), bit 6 second (8); terrain/render#vertex-formats lists which formats the terrain code binds. 0x58a7c0(buffer, id) binds a buffer with format id: it sets the attribute mask (0x592a60, which also sets the dirty mask [dev+0x27dc] |= old ^ new), the format id and the stride (0x592aa0).

idstridecomponents
00xcposition
1, 20x18, 0x1cposition, normal; and colour
3, 40x20, 0x24position, normal, texcoord 0; and colour
5, 60x28, 0x2cposition, normal, texcoords 0 and 1; and colour
70x10position, colour
8, 90x18, 0x20position, colour, texcoord 0; and texcoord 1
10, 110x14, 0x1cposition, texcoord 0; and texcoord 1
120x30position, 4 bytes, 4 bytes, normal, texcoords 0 and 1

The derivation is in the doc.

Callers 39

Callees 3

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