CGxDeviceOpenGl::CreateContext
function · gx · host
- Address
0x58c340· 180 bytes, up to0x58c3f3- Signature
uint32_t __thiscall (CGxDeviceOpenGl *this, void *format)- Meaning
- Creates and makes current the device's context for a format, sets vsync and the initial state
- 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 2
Callees 8
- 0x58bfd0 gx
- LoadGlEntryPoints gx
- CGxDeviceOpenGl::DestroyContext gx
- 0x58e480 gx
- CGxDevice::FlushRenderState gx
- CGxDeviceOpenGl::BeginFrame gx
- CGxDeviceOpenGl::InitState gx
- SetFormatAndCreateContext gx
Calls and jumps by a bare address, from tables/calls.tsv.