gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 8 May 2023 02:59:51 +0000 (10:59 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 9 May 2023 03:47:28 +0000 (11:47 +0800)
commitd02ae09124aa2bfbc71ed4404ebe6accef861bec
treebdb86813f4585613b8dfb4cf97979dceb97437c3
parentd948ac62e4432a424c10e9ab95c7d71e4f9893e9
gdkglcontext-win32-wgl.c: Fix WGL context realization on 32-bit

We are currently using g_clear_pointer() on the intermediate WGL contexts
(HGLRC)'s that we need to create in the way, which means that we need to ensure
that the correct calling convention for wglDeleteContext() is being applied.

To be absolutely safe about it, use the gdk_win32_private_wglDeleteContext()
calls, which will in turn call wglDeleteContext() directly from opengl32.dll
(using the OpenGL headers from the Windows SDK) instead of going via libepoxy,
which will assure us that the correct calling convention is applied.

Fixes issue #5808.
gdk/win32/gdkglcontext-win32-wgl.c