benilla-re systems structs docs

CGxDevice::SetAttributeMask

function · gx · primitive

Address
0x592a60 · 50 bytes, up to 0x592a91
Signature
void __thiscall (CGxDevice *this, uint32_t mask)
Meaning
Replaces the vertex attribute mask and ors the bits that changed into the dirty mask
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 1

Callees 0

None by a direct call or jump.

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