summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-12-30 10:32:58 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-12-30 10:32:58 +0000
commit76e967889f182d41a64dddbabd668978369358a5 (patch)
treebe571506a115aee9978ef16c73ad61cdeb1ea6a5
parentd3db965083a783672ce39c36883c194a403abdac (diff)
STR #1131: there is no good way in Mac OS X to support an OpenGL
overlay (well, at least none that I could find) so I decided to simplify the overlay code. FLTK tricked a little using the front render buffer, however OS X 10.4 does not support that anymore. Anyway, here's the slow, but working, solution. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Gl_Overlay.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx
index 3e3289545..c1622e962 100644
--- a/src/Fl_Gl_Overlay.cxx
+++ b/src/Fl_Gl_Overlay.cxx
@@ -196,16 +196,26 @@ int Fl_Gl_Window::can_do_overlay() {
void Fl_Gl_Window::redraw_overlay() {
if (!shown()) return;
make_overlay();
+#ifdef __APPLE__
+ redraw();
+#else
#ifndef WIN32
if (overlay != this)
((Fl_Gl_Window*)overlay)->redraw();
else
#endif
damage(FL_DAMAGE_OVERLAY);
+#endif
}
void Fl_Gl_Window::make_overlay_current() {
make_overlay();
+#ifdef __APPLE__
+ // this is not very useful, but unfortunatly, Apple decided
+ // that front buffer drawing can no longer (OS X 10.4) be
+ // supported on their platforms.
+ make_current();
+#else
#if HAVE_GL_OVERLAY
if (overlay != this) {
#ifdef WIN32
@@ -218,6 +228,7 @@ void Fl_Gl_Window::make_overlay_current() {
} else
#endif
glDrawBuffer(GL_FRONT);
+#endif
}
void Fl_Gl_Window::hide_overlay() {