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
This commit is contained in:
Manolo Gouy 2018-11-02 12:21:06 +00:00
parent 8a04aeb146
commit 09abaf4339

View File

@ -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);