benilla-re systems structs docs

CGxDeviceOpenGl::FlushLights

function · gx · orchestration

Address
0x59c820 · 461 bytes, up to 0x59c9ec
Signature
void __thiscall (CGxDeviceOpenGl *this)
Meaning
Sets glLight position, attenuation and colours of each dirty light, loading the view matrix first
Confidence
verified, proof one
Finding
gx/draw#opengl-draw-preparation
Test
gx::light_dir_negate_matches_binary

Finding: OpenGL draw preparation in gx: drawing

Before each draw OpenGL runs 0x59c6d0: it merges the dirty masks, flushes render state, then applies lights (0x59c820), the fill mode (0x59c9f0, glPolygonMode fill 0x1b02 or line 0x1b01 from capability bit 9), texture matrices, the viewport (0x59c730) and the attribute arrays (0x59c100). 0x59c100 sets the current colour with glColor4fv from id 1 when the format has no colour, then per component enables or disables the client array and passes the pointer (glVertexPointer, glNormalPointer, glColorPointer, glTexCoordPointer) at the buffer offset.

The derivation is in the doc.

Callers 1

Callees 1

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