FLTK logo

[master] bfba62a - GL3 for macOS platform: allow creation of GL1 and GL3 contexts by an app.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] bfba62a - GL3 for macOS platform: allow creation of GL1 and GL3 contexts by an app. "ManoloFLTK" Sep 23, 2022  
 
commit bfba62a8a29f4dd2db3751778ba2a9aef86107a4
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 23 18:21:29 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 23 18:21:29 2022 +0200

    GL3 for macOS platform: allow creation of GL1 and GL3 contexts by an app.

 src/Fl_cocoa.mm | 1 +
 1 file changed, 1 insertion(+)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 8b5a705..b7b7d22 100644
--- src/Fl_cocoa.mm
+++ 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) {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.