forked from AuroraMiddleware/gtk
6c00117119
This commit attempts to split GdkWin32GLContext into two parts, one for WGL and the other for EGL (ANGLE), and attempts to simplify things a bit, by: * We are already creating a Win32 window to capture display changes, so we can just use that to act as our dummy window that we use to find out the pixel format that the system supports for WGL. We also use it to obtain the dummy legacy WGL context that we will always require to create our more advanced Core WGL contexts. * Like what is done in X11, store up the WGL pixel format or the EGLConfig in our GdkWin32Display. * Ensure we do not create the dummy WGL context unnecessarily. In this way, we can successfully create the WGL/EGL contexts, however there are some issues at this point: * For WGL, the code successfully initializes and realizes the WGL Contexts, but for some reason things became invisible. When running gtk4-demo, this can be verified by seeing the mouse cursor changing when moved to spots where one can resize the window, although they were invisible. * For EGL, the code initializes EGL but could not realize the EGL context as shaders failed to compile. It seems like the shader issue is definitely outside the scope of this MR.
68 lines
1.5 KiB
Meson
68 lines
1.5 KiB
Meson
gdk_win32_sources = files([
|
|
'gdkcairocontext-win32.c',
|
|
'gdkcursor-win32.c',
|
|
'gdkclipboard-win32.c',
|
|
'gdkclipdrop-win32.c',
|
|
'gdkdevicemanager-win32.c',
|
|
'gdkdevice-virtual.c',
|
|
'gdkdevice-win32.c',
|
|
'gdkdevice-wintab.c',
|
|
'gdkdisplay-win32.c',
|
|
'gdkdisplaymanager-win32.c',
|
|
'gdkdrag-win32.c',
|
|
'gdkdrop-win32.c',
|
|
'gdkevents-win32.c',
|
|
'gdkglcontext-win32.c',
|
|
'gdkglcontext-win32-wgl.c',
|
|
'gdkglobals-win32.c',
|
|
'gdkhdataoutputstream-win32.c',
|
|
'gdkkeys-win32.c',
|
|
'gdkwin32langnotification.c',
|
|
'gdkmain-win32.c',
|
|
'gdkmonitor-win32.c',
|
|
'gdkproperty-win32.c',
|
|
'gdkscreen-win32.c',
|
|
'gdkvulkancontext-win32.c',
|
|
'gdkwin32cursor.h',
|
|
'gdkwin32display.h',
|
|
'gdkwin32id.c',
|
|
'gdksurface-win32.c',
|
|
])
|
|
|
|
gdk_win32_public_headers = files([
|
|
'gdkwin32cursor.h',
|
|
'gdkwin32display.h',
|
|
'gdkwin32displaymanager.h',
|
|
'gdkwin32dnd.h',
|
|
'gdkwin32glcontext.h',
|
|
'gdkwin32keys.h',
|
|
'gdkwin32misc.h',
|
|
'gdkwin32monitor.h',
|
|
'gdkwin32screen.h',
|
|
'gdkwin32surface.h',
|
|
])
|
|
|
|
install_headers(gdk_win32_public_headers, 'gdkwin32.h', subdir: 'gtk-4.0/gdk/win32/')
|
|
|
|
GDK_WIN32_EGL_CFLAGS = []
|
|
|
|
if win32_has_egl
|
|
GDK_WIN32_EGL_CFLAGS = ['-DGDK_WIN32_ENABLE_EGL']
|
|
gdk_win32_sources += ['gdkglcontext-win32-egl.c']
|
|
endif
|
|
|
|
gdk_win32_deps = [ # FIXME
|
|
pangowin32_dep
|
|
]
|
|
|
|
libgdk_win32 = static_library('gdk-win32',
|
|
gdk_win32_sources, gdkconfig, gdkenum_h,
|
|
include_directories: [ confinc, gdkinc ],
|
|
c_args: [
|
|
'-DGTK_COMPILATION',
|
|
'-DG_LOG_DOMAIN="Gdk"',
|
|
'-DINSIDE_GDK_WIN32',
|
|
] + GDK_WIN32_EGL_CFLAGS,
|
|
dependencies: [ gdk_deps, gdk_win32_deps ],
|
|
)
|