diff options
Diffstat (limited to 'src/drivers/WinAPI')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H | 4 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H index 2de50eb44..6934fec15 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.H @@ -41,7 +41,9 @@ class Fl_WinAPI_Gl_Window_Driver : public Fl_Gl_Window_Driver { virtual void invalidate() {} virtual int flush_begin(char& valid_f); virtual Fl_Gl_Choice *find(int m, const int *alistp); - virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer = 0); + virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g); + GLContext do_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, + int layer); virtual void set_gl_context(Fl_Window* w, GLContext context); virtual void delete_gl_context(GLContext); virtual void make_overlay_current(); diff --git a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx index ca72d3e92..bf5f791b3 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx @@ -128,7 +128,8 @@ Fl_Gl_Choice *Fl_WinAPI_Gl_Window_Driver::find(int m, const int *alistp) } -GLContext Fl_WinAPI_Gl_Window_Driver::create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) +GLContext Fl_WinAPI_Gl_Window_Driver::do_create_gl_context(Fl_Window* window, + const Fl_Gl_Choice* g, int layer) { Fl_X* i = Fl_X::i(window); HDC hdc = Fl_WinAPI_Window_Driver::driver(window)->private_dc; @@ -150,6 +151,11 @@ GLContext Fl_WinAPI_Gl_Window_Driver::create_gl_context(Fl_Window* window, const } +GLContext Fl_WinAPI_Gl_Window_Driver::create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g) +{ + do_create_gl_context(window, g, 0); +} + void Fl_WinAPI_Gl_Window_Driver::set_gl_context(Fl_Window* w, GLContext context) { if (context != cached_context || w != cached_window) { cached_context = context; @@ -208,7 +214,7 @@ void Fl_WinAPI_Gl_Window_Driver::gl_hide_before(void *& overlay) { void Fl_WinAPI_Gl_Window_Driver::make_overlay(void*&overlay) { if (overlay) return; - GLContext context = create_gl_context(pWindow, g(), 1); + GLContext context = do_create_gl_context(pWindow, g(), 1); if (!context) {overlay = pWindow; return;} // fake the overlay HDC hdc = Fl_WinAPI_Window_Driver::driver(pWindow)->private_dc; |
