diff options
| author | Manolo Gouy <Manolo> | 2018-10-31 12:45:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-10-31 12:45:51 +0000 |
| commit | 6c8115ee9b30a89724df122c0af20c24ac6cfe52 (patch) | |
| tree | e9142b3a91954f2ca61c3a49fb855af7f6198909 /src/Fl_Gl_Choice.cxx | |
| parent | 22bcc7b4cacee37be4e0559c84c848d1f6b1daf6 (diff) | |
Remove use of Fl_Gl_Window_Driver.H in file src/Fl_cocoa.mm
Thus, Fl_cocoa.mm is completely independent from code of libfltk_gl.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13104 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Choice.cxx')
| -rw-r--r-- | src/Fl_Gl_Choice.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index c0e337674..7aa9171b0 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -85,13 +85,15 @@ static Fl_Window* cached_window; #ifdef FL_CFG_GFX_QUARTZ +# include "drivers/Cocoa/Fl_Cocoa_Window_Driver.H" + extern void gl_texture_reset(); Fl_Gl_Choice *Fl_Cocoa_Gl_Window_Driver::find(int m, const int *alistp) { Fl_Gl_Choice *g = Fl_Gl_Window_Driver::find_begin(m, alistp); if (g) return g; - NSOpenGLPixelFormat* fmt = mode_to_NSOpenGLPixelFormat(m, alistp); + NSOpenGLPixelFormat* fmt = Fl_Cocoa_Window_Driver::mode_to_NSOpenGLPixelFormat(m, alistp); if (!fmt) return 0; g = new Fl_Gl_Choice(m, alistp, first); first = g; @@ -105,7 +107,7 @@ GLContext Fl_Cocoa_Gl_Window_Driver::create_gl_context(Fl_Window* window, const // resets the pile of string textures used to draw strings // necessary before the first context is created if (!shared_ctx) gl_texture_reset(); - context = create_GLcontext_for_window((NSOpenGLPixelFormat*)g->pixelformat, shared_ctx, window); + context = Fl_Cocoa_Window_Driver::create_GLcontext_for_window((NSOpenGLPixelFormat*)g->pixelformat, shared_ctx, window); if (!context) return 0; add_context(context); return (context); @@ -115,7 +117,7 @@ void Fl_Cocoa_Gl_Window_Driver::set_gl_context(Fl_Window* w, GLContext context) if (context != cached_context || w != cached_window) { cached_context = context; cached_window = w; - GLcontext_makecurrent(context); + Fl_Cocoa_Window_Driver::GLcontext_makecurrent(context); } } @@ -123,9 +125,9 @@ void Fl_Cocoa_Gl_Window_Driver::delete_gl_context(GLContext context) { if (cached_context == context) { cached_context = 0; cached_window = 0; - GL_cleardrawable(); + Fl_Cocoa_Window_Driver::GL_cleardrawable(); } - GLcontext_release(context); + Fl_Cocoa_Window_Driver::GLcontext_release(context); del_context(context); } |
