[gtk/wip/chergert/gdk-macos-gl-renderer: 7/26] macos: use shared data GL context
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gdk-macos-gl-renderer: 7/26] macos: use shared data GL context
- Date: Thu, 29 Oct 2020 00:12:12 +0000 (UTC)
commit 4dfbb34a02549c4e2f4fa2380299b685c94eaf46
Author: Christian Hergert <chergert redhat com>
Date: Thu Oct 22 14:04:52 2020 -0700
macos: use shared data GL context
This fixes drawing of supplemental windows which were previously just empty or
black. It also fixes drawing into opaque windows with titled style masks.
gdk/macos/gdkmacosglcontext.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c
index 38a42634f4..e41b4d2ee9 100644
--- a/gdk/macos/gdkmacosglcontext.c
+++ b/gdk/macos/gdkmacosglcontext.c
@@ -89,6 +89,14 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
return FALSE;
}
+ if (shared == NULL)
+ {
+ GdkGLContext *shared_data = gdk_surface_get_shared_data_gl_context (surface);
+
+ if (shared_data != NULL)
+ shared_gl_context = get_ns_open_gl_context (GDK_MACOS_GL_CONTEXT (shared_data), NULL);
+ }
+
nswindow = _gdk_macos_surface_get_native (GDK_MACOS_SURFACE (surface));
pixelFormat = [GdkMacosGLView defaultPixelFormat];
gl_context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]