From 5595fa3ae60386bdb6ae4caf8f488779e3c342a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 26 Oct 2018 13:21:14 +0200 Subject: [PATCH] Cocoa: Fix OpenGL rendering not being displayed Fix based on information provided by @rcgordon. Fixes #1334. Closes #1346. --- README.md | 2 ++ src/cocoa_window.m | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index a5b66b36..33b031a8 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,8 @@ information on what to include when reporting a bug. - [Cocoa] Bugfix: Window was resized twice when entering full screen (#1085) - [Cocoa] Bugfix: Duplicate size events were not filtered (#1085) - [Cocoa] Bugfix: Event polling did not initialize AppKit if necessary (#1218) +- [Cocoa] Bugfix: OpenGL rendering was not initially visible on 10.14 + (#1334,#1346) - [WGL] Added support for `WGL_EXT_colorspace` for OpenGL ES contexts - [WGL] Added support for `WGL_ARB_create_context_no_error` - [GLX] Added support for `GLX_ARB_create_context_no_error` diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 308b5d84..43a38dda 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -476,6 +476,14 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; return YES; } +- (void)updateLayer +{ + if (window->context.client != GLFW_NO_API) + [window->context.nsgl.object update]; + + _glfwInputWindowDamage(window); +} + - (id)makeBackingLayer { if (window->ns.layer)