summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 0002038a7..86b9c36a7 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.cxx,v 1.12.2.13 2000/06/05 21:20:51 mike Exp $"
+// "$Id: Fl_Gl_Window.cxx,v 1.12.2.14 2000/06/10 18:24:30 bill Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -146,7 +146,12 @@ void Fl_Gl_Window::ortho() {
void Fl_Gl_Window::swap_buffers() {
#ifdef _WIN32
+#if HAVE_GL_OVERLAY
+ // Do not swap the overlay, to match GLX:
+ wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_MAIN_PLANE);
+#else
SwapBuffers(Fl_X::i(this)->private_dc);
+#endif
#else
glXSwapBuffers(fl_display, fl_xid(this));
#endif
@@ -167,10 +172,9 @@ void Fl_Gl_Window::flush() {
#endif
#if HAVE_GL_OVERLAY && defined(_WIN32)
- if (overlay && overlay != this &&
- ((damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE))
- || !save_valid)) {
- // Draw into hardware overlay planes
+ // Draw into hardware overlay planes:
+ if (overlay && overlay != this
+ && (damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE) || !save_valid)) {
fl_set_gl_context(this, (GLXContext)overlay);
if (fl_overlay_depth)
wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE);
@@ -180,8 +184,8 @@ void Fl_Gl_Window::flush() {
draw_overlay();
fl_overlay = 0;
valid(save_valid);
- if (damage() == FL_DAMAGE_OVERLAY) {
- wglSwapLayerBuffers(Fl_X::i(this)->private_dc,WGL_SWAP_OVERLAY1);
+ wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_OVERLAY1);
+ if (damage() == FL_DAMAGE_OVERLAY) { // main layer is undamaged
if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
return;
}
@@ -323,5 +327,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
-// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.13 2000/06/05 21:20:51 mike Exp $".
+// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.14 2000/06/10 18:24:30 bill Exp $".
//