diff options
| author | Manolo Gouy <Manolo> | 2018-10-16 09:27:36 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-10-16 09:27:36 +0000 |
| commit | 1367048df23b745328883279e59cb09ab2695d3a (patch) | |
| tree | f5654a6dbe707d0bb3c94df15f1b50b4d0e96037 /src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | |
| parent | f58c1d85b8af1fcbb0ba1cbd310b31ae80f15c20 (diff) | |
Fix Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window*) by making current the window's GL context.
The problem was visible with test/cube: when the window was minimized, only the left GL subwindow
was captured in the window icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx')
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx index 66570ae41..f574c671c 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx @@ -69,6 +69,7 @@ Fl_RGB_Image* Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window* glw, w *= factor; h *= factor; x *= factor; y *= factor; } Fl_Cocoa_Gl_Window_Driver *driver = (Fl_Cocoa_Gl_Window_Driver*)glw->gl_driver(); + driver->GLcontext_makecurrent(glw->context()); driver->flush_context(); // to capture also the overlay and for directGL demo // Read OpenGL context pixels directly. // For extra safety, save & restore OpenGL states that are changed |
