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
This commit is contained in:
Matthias Melcher 2005-12-30 10:32:58 +00:00
parent d3db965083
commit 76e967889f
1 changed files with 11 additions and 0 deletions

View File

@ -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() {