benilla-re systems structs docs

s_lightningStaticGuards

global · gx

Address
0xcf57a8 · 1 bytes, up to 0xcf57a8
Type
uint8_t
Meaning
Holds the guard bits of the four static objects the bolt render builds on first use
Confidence
verified, proof one
Finding
gx/lightning#static-initializers

Finding: Static initializers in gx: lightning

The object file's run in the initializer table is 0x7af990 (copies +∞ from 0x81d814 to 0xcf57ac), 0x7b0c10 (2π to 0xcf5850), 0x7b0c30 (1 / 2π to 0xcf57b8) and 0x7af5c0, which seeds the generator and registers an empty exit hook with _atexit. The render function lazily builds its four static objects on first use, each with an empty exit hook: the identity matrix 0xcf5768 (hook 0x7b06f0), the saved view 0xcf57c0 (0x7b06e0), the camera-relative view 0xcf5800 (0x7b06d0) and the normal (0, 0, 1) at 0xcf5840 (0x7b06c0). The static centre line has its own hook, 0x7afc90.

The derivation is in the doc.