diff options
| -rw-r--r-- | src/Fl_Gl_Device_Plugin.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index 53fc5afad..f8e1e1021 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -58,13 +58,15 @@ static void print_gl_window(Fl_Abstract_Printer *printer, Fl_Gl_Window *glw, int Fl_Window *win = (Fl_Window*)glw; while( win->window() ) win = win->window(); win->redraw(); + Fl::check(); + glw->make_current(); #else + glw->make_current(); glw->redraw(); -#endif + glFlush(); Fl::check(); - glw->make_current(); - // select front buffer as our source for pixel data - glReadBuffer(GL_FRONT); + glFinish(); +#endif // Read OpenGL context pixels directly. // For extra safety, save & restore OpenGL states that are changed glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); |
