Author: spitzak
Date: 2007-06-05 17:34:23 -0400 (Tue, 05 Jun 2007)
New Revision: 5875
Log:
Does not set the current context to zero, so calls like DeleteDisplayList
and so on can be done.


Modified:
   trunk/OpenGL/Fl_Gl_Choice.cxx

Modified: trunk/OpenGL/Fl_Gl_Choice.cxx
===================================================================
--- trunk/OpenGL/Fl_Gl_Choice.cxx       2007-06-05 21:33:12 UTC (rev 5874)
+++ trunk/OpenGL/Fl_Gl_Choice.cxx       2007-06-05 21:34:23 UTC (rev 5875)
@@ -274,15 +274,17 @@
 }
 
 void fltk::no_gl_context() {
+  if (fl_current_glcontext != first_context) {
 #if USE_X11
-  glXMakeCurrent(xdisplay, 0, 0);
+    glXMakeCurrent(xdisplay, message_window, first_context);
 #elif defined(_WIN32)
-  wglMakeCurrent(0, 0);
+    wglMakeCurrent(getDC(), first_context);
 #elif defined(__APPLE__)
-  // warning: the Quartz version should probably use Core GL (CGL) instead of 
AGL
-  if (fl_current_glcontext) aglSetCurrentContext(0);
+    // warning: the Quartz version should probably use Core GL (CGL) instead 
of AGL
+    aglSetCurrentContext(first_context);
 #endif
-  fl_current_glcontext = 0;
+    fl_current_glcontext = first_context;
+  }
   cached_window = 0;
 }
 

_______________________________________________
fltk-commit mailing list
fltk-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to