summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Overlay.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Gl_Overlay.cxx')
-rw-r--r--src/Fl_Gl_Overlay.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx
index a3518000e..5bf993ab2 100644
--- a/src/Fl_Gl_Overlay.cxx
+++ b/src/Fl_Gl_Overlay.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.17 2001/03/20 18:02:52 spitzak Exp $"
+// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18 2001/05/05 23:39:01 spitzak Exp $"
//
// OpenGL overlay code for the Fast Light Tool Kit (FLTK).
//
@@ -66,6 +66,7 @@ extern unsigned long fl_transparent_pixel;
extern uchar fl_overlay;
class _Fl_Gl_Overlay : public Fl_Gl_Window {
+ void flush();
void draw();
public:
void show();
@@ -75,6 +76,22 @@ public:
}
};
+void _Fl_Gl_Overlay::flush() {
+ make_current();
+#ifdef BOXX_BUGS
+ // The BoXX overlay is broken and you must not call swap-buffers. This
+ // code will make it work, but we lose because machines that do support
+ // double-buffered overlays will blink when they don't have to
+ glDrawBuffer(GL_FRONT);
+ draw();
+#else
+ draw();
+ swap_buffers();
+#endif
+ glFlush();
+ valid(1);
+}
+
void _Fl_Gl_Overlay::draw() {
if (!valid_) glClearIndex((GLfloat)fl_transparent_pixel);
if (damage() != FL_DAMAGE_EXPOSE) glClear(GL_COLOR_BUFFER_BIT);
@@ -214,5 +231,5 @@ void Fl_Gl_Window::hide_overlay() {
#endif
//
-// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.17 2001/03/20 18:02:52 spitzak Exp $".
+// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.18 2001/05/05 23:39:01 spitzak Exp $".
//