GDK-Win32: Add wrapper functions for calling core wgl* functions
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 24 Mar 2023 03:08:26 +0000 (11:08 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 24 Mar 2023 10:43:23 +0000 (18:43 +0800)
commit627ee674e56938f941af41c5f1833f714b58a6fd
tree284f312e8169a9395337625dfe65130c7690a589
parenta8b211ff15aa473c869a81dfcf0db90b123bd639
GDK-Win32: Add wrapper functions for calling core wgl* functions

We might be dealing with GL contexts from different threads, which have more
gotchas when we are using libepoxy, so in case the function pointers for
these are invalidated by wglMakeCurrent() calls outside of GTK/GDK, such as
in GstGL, we want to use these functions that are directly linked to
opengl32.dll provided by the system/ICD, by linking to opengl32.lib.

This will ensure that we will indeed call the "correct" wgl* functions that
we need.

This should help fix issue #5685.
gdk/win32/gdkglcontext-win32-wgl-private.c [new file with mode: 0644]
gdk/win32/gdkglcontext-win32-wgl.c
gdk/win32/gdkglcontext-win32.h
gdk/win32/meson.build