benilla-re systems structs docs

s_d3dCullMode

global · gx

Address
0x80a2a8 · 8 bytes, up to 0x80a2af
Type
uint32_t[2]
Meaning
Holds the D3DCULL value for cull off and on: none, clockwise
Confidence
verified, proof one
Finding
gx/renderstate#cull-fog-and-masks

Finding: Cull, fog and masks in gx: render state

Id 20 with its capability bit set and a non-zero value culls; Direct3D sets CULLMODE to D3DCULL_CW (2) for it and D3DCULL_NONE (1) otherwise (0x80a2a8); OpenGL toggles GL_CULL_FACE (0xb44). The face to cull is the separate OpenGL state 0x4e, glCullFace, set by other code. Id 9 picks the fog mode from 0x80a28c (3, 1, 2: linear, exp, exp2) or 0x85c358 (GL_LINEAR, GL_EXP, GL_EXP2); ids 10 to 13 are start, end, density and colour. The colour mask of id 19 is passed whole to COLORWRITEENABLE (0xa8) or split into four glColorMask booleans.

The derivation is in the doc.