From 09abaf433905d46835f5864c65fe219259381949 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 2 Nov 2018 12:21:06 +0000 Subject: Further fix to support gl_start()/gl_finish() under MacOS platform. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Choice.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 7aa9171b0..93967cd15 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -86,11 +86,13 @@ static Fl_Window* cached_window; #ifdef FL_CFG_GFX_QUARTZ # include "drivers/Cocoa/Fl_Cocoa_Window_Driver.H" +# include "Fl_Screen_Driver.H" extern void gl_texture_reset(); Fl_Gl_Choice *Fl_Cocoa_Gl_Window_Driver::find(int m, const int *alistp) { + Fl::screen_driver()->open_display(); // useful when called through gl_start() Fl_Gl_Choice *g = Fl_Gl_Window_Driver::find_begin(m, alistp); if (g) return g; NSOpenGLPixelFormat* fmt = Fl_Cocoa_Window_Driver::mode_to_NSOpenGLPixelFormat(m, alistp); -- cgit v1.2.3