mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 15:01:23 +00:00
de9c9efa6f
This implements the basics for a GdkGLContext on macOS. Currently, rendering only is fully working for the GskCairoRenderer case where we read back pixels into a cairo surface for rendering. More work on synchronization is required for the GL on GskGLRenderer case. When we attempt to render a surface itself with GL, the context will ensure that the new GdkMacosGLView is placed within the NSWindow. In other cases, we use a dummy NSView and NSWindow for backing the NSOpenGLContext to ensure that we can get accelerated drawing. This gets GtkGLArea working when running with GSK_RENDERER=cairo.
64 lines
1.5 KiB
Meson
64 lines
1.5 KiB
Meson
gdk_macos_sources = files([
|
|
'edgesnapping.c',
|
|
|
|
'gdkdisplaylinksource.c',
|
|
'gdkmacoscairocontext.c',
|
|
'gdkmacosclipboard.c',
|
|
'gdkmacoscursor.c',
|
|
'gdkmacosdevice.c',
|
|
'gdkmacosdisplay.c',
|
|
'gdkmacosdisplay-settings.c',
|
|
'gdkmacosdisplay-translate.c',
|
|
'gdkmacosdrag.c',
|
|
'gdkmacosdragsurface.c',
|
|
'gdkmacosglcontext.c',
|
|
'gdkmacoseventsource.c',
|
|
'gdkmacoskeymap.c',
|
|
'gdkmacosmonitor.c',
|
|
'gdkmacospopupsurface.c',
|
|
'gdkmacosseat.c',
|
|
'gdkmacossurface.c',
|
|
'gdkmacostoplevelsurface.c',
|
|
|
|
'GdkMacosBaseView.c',
|
|
'GdkMacosCairoView.c',
|
|
'GdkMacosCairoSubview.c',
|
|
'GdkMacosGLView.c',
|
|
'GdkMacosWindow.c',
|
|
])
|
|
|
|
gdk_macos_public_headers = files([
|
|
'gdkmacosdevice.h',
|
|
'gdkmacosdisplay.h',
|
|
'gdkmacosglcontext.h',
|
|
'gdkmacoskeymap.h',
|
|
'gdkmacosmonitor.h',
|
|
'gdkmacossurface.h',
|
|
])
|
|
|
|
install_headers(gdk_macos_public_headers, 'gdkmacos.h', subdir: 'gtk-4.0/gdk/macos/')
|
|
|
|
gdk_macos_frameworks = [
|
|
'AppKit',
|
|
'Carbon',
|
|
'CoreVideo',
|
|
'CoreServices',
|
|
'Foundation',
|
|
'OpenGL',
|
|
'QuartzCore',
|
|
]
|
|
|
|
gdk_macos_deps = [
|
|
dependency('appleframeworks', modules: gdk_macos_frameworks)
|
|
]
|
|
|
|
libgdk_c_args += ['-xobjective-c']
|
|
|
|
libgdk_macos = static_library('gdk-macos',
|
|
gdk_macos_sources, gdkconfig, gdkenum_h,
|
|
include_directories: [ confinc, gdkinc, ],
|
|
c_args: libgdk_c_args + common_cflags,
|
|
link_args: common_ldflags,
|
|
link_with: [],
|
|
dependencies: gdk_deps + gdk_macos_deps)
|