mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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:
@@ -196,16 +196,26 @@ int Fl_Gl_Window::can_do_overlay() {
|
|||||||
void Fl_Gl_Window::redraw_overlay() {
|
void Fl_Gl_Window::redraw_overlay() {
|
||||||
if (!shown()) return;
|
if (!shown()) return;
|
||||||
make_overlay();
|
make_overlay();
|
||||||
|
#ifdef __APPLE__
|
||||||
|
redraw();
|
||||||
|
#else
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if (overlay != this)
|
if (overlay != this)
|
||||||
((Fl_Gl_Window*)overlay)->redraw();
|
((Fl_Gl_Window*)overlay)->redraw();
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
damage(FL_DAMAGE_OVERLAY);
|
damage(FL_DAMAGE_OVERLAY);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Gl_Window::make_overlay_current() {
|
void Fl_Gl_Window::make_overlay_current() {
|
||||||
make_overlay();
|
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 HAVE_GL_OVERLAY
|
||||||
if (overlay != this) {
|
if (overlay != this) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -218,6 +228,7 @@ void Fl_Gl_Window::make_overlay_current() {
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
glDrawBuffer(GL_FRONT);
|
glDrawBuffer(GL_FRONT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Gl_Window::hide_overlay() {
|
void Fl_Gl_Window::hide_overlay() {
|
||||||
|
|||||||
Reference in New Issue
Block a user