benilla-re systems structs docs

CGxDeviceOpenGl::DeviceSetFormat

function · gx · orchestration

Address
0x58ce40 · 204 bytes, up to 0x58cf0b
Signature
uint32_t __thiscall (CGxDeviceOpenGl *this, void *format)
Meaning
Logs a format, recreates the window and context for it and uploads the gamma ramp
Confidence
verified, proof one
Finding
gx/opengl#context-creation-and-release

Finding: Context creation and release in gx: the OpenGL context and extensions

CGxDeviceOpenGl::DeviceSetFormat(format) logs the format, releases the context, copies the format, opens the window for it and creates the context. Creation gets the window's device context, sets the pixel format and makes a context current; with WGL_EXT_swap_control it passes the format's vertical sync byte, as 0 or 1, to wglSwapIntervalEXT. It then reads the caps, calls 0x58bfd0 and the device's slot +0xc with the format, sets the initial state, flushes the render states and calls 0x59b890(3). A failed format or context leaves the device without one and returns 0; success uploads the working gamma ramp. Release restores the saved desktop ramp to the device context before letting it go.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 9

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