Author: manolo Date: 2010-03-17 13:47:47 -0700 (Wed, 17 Mar 2010) New Revision: 7290 Log: Added trick to force loading of Fl_Gl_Device_Plugin whenever fltk_gl is loaded.
Modified: branches/branch-1.3/src/Fl_Gl_Device_Plugin.cxx branches/branch-1.3/src/Fl_Gl_Window.cxx Modified: branches/branch-1.3/src/Fl_Gl_Device_Plugin.cxx =================================================================== --- branches/branch-1.3/src/Fl_Gl_Device_Plugin.cxx 2010-03-17 17:23:41 UTC (rev 7289) +++ branches/branch-1.3/src/Fl_Gl_Device_Plugin.cxx 2010-03-17 20:47:47 UTC (rev 7290) @@ -29,9 +29,16 @@ _XGC *save_gc = fl_gc; const int bytesperpixel = 3; #endif - glw->redraw(); fl_gc = NULL; +#ifdef WIN32 Fl::check(); + Fl_Window *win = (Fl_Window*)glw; + while( win->window() ) win = win->window(); + win->redraw(); +#else + glw->redraw(); +#endif + Fl::check(); glw->make_current(); // select front buffer as our source for pixel data glReadBuffer(GL_FRONT); @@ -109,3 +116,6 @@ static Fl_Gl_Device_Plugin Gl_Device_Plugin; +// The purpose of this variable, used in Fl_Gl_Window.cxx, is only to force this file to be loaded +// whenever Fl_Gl_Window.cxx is loaded, that is, whenever fltk_gl is. +FL_EXPORT int fl_gl_load_plugin = 0; Modified: branches/branch-1.3/src/Fl_Gl_Window.cxx =================================================================== --- branches/branch-1.3/src/Fl_Gl_Window.cxx 2010-03-17 17:23:41 UTC (rev 7289) +++ branches/branch-1.3/src/Fl_Gl_Window.cxx 2010-03-17 20:47:47 UTC (rev 7290) @@ -28,6 +28,10 @@ #include "flstring.h" #if HAVE_GL +extern int fl_gl_load_plugin; + +static int temp = fl_gl_load_plugin; + #include <FL/Fl.H> #include <FL/x.H> #include "Fl_Gl_Choice.H" _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
