summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Overlay.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2001-05-05 23:39:01 +0000
committerBill Spitzak <spitzak@gmail.com>2001-05-05 23:39:01 +0000
commit38c947bd093c0edb1eb746911150574fa4a0fb2f (patch)
treec922543815eeb098268eec8d1b418530950b80dc /src/Fl_Gl_Overlay.cxx
parent325c0838f4e816f1129a29949b9054f32dba8fe0 (diff)
Compiling with -DBOXX_BUGS will work around some problems with the newest
X drivers that BoXX delivers, the problems all affect use of Overlays for normal X drawing and OpenGL drawing. Normal compilation is unchanged. The file chooser buttons use user_data() rather than the label to decide what to do, allowing the label to be somewhat cleaner. Selection color on X changed to blue, to match what happens on Windows now. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1452 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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 $".
//