From bfba62a8a29f4dd2db3751778ba2a9aef86107a4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 23 Sep 2022 18:21:29 +0200 Subject: GL3 for macOS platform: allow creation of GL1 and GL3 contexts by an app. --- src/Fl_cocoa.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 8b5a705fa..b7b7d22b7 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2923,6 +2923,7 @@ NSOpenGLContext* Fl_Cocoa_Window_Driver::create_GLcontext_for_window(NSOpenGLPix NSOpenGLContext *shared_ctx, Fl_Window *window) { NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:shared_ctx]; + if (shared_ctx && !context) context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:nil]; if (context) { FLView *view = (FLView*)[fl_xid(window) contentView]; if (fl_mac_os_version >= 100700) { -- cgit v1.2.3