diff options
| author | Manolo Gouy <Manolo> | 2010-03-28 06:58:39 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-03-28 06:58:39 +0000 |
| commit | 2a75e82e3df5ac792a8d2e780e4374463bcf654c (patch) | |
| tree | 2de153d99392ff65c820b351f2abfc2783fc209d | |
| parent | 092b65139d48d609aeaffc95d3c9ef14ca5ee436 (diff) | |
Fl_Gl_Device_Plugin: better code for GL window capture after coverage by print dialog windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -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); |
