From 512332670a87377ba6b705232d22a67681fba3ff Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 19 Oct 1998 17:53:09 +0000 Subject: Added Gustavo's damage() update - now use symbolic constants for all values! git-svn-id: file:///fltk/svn/fltk/trunk@18 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Window.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Fl_Gl_Window.cxx') diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 44b14518e..a7f96118e 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -144,7 +144,7 @@ void Fl_Gl_Window::flush() { #if HAVE_GL_OVERLAY #ifdef WIN32 uchar save_valid = valid_; - if (overlay && overlay!= this && damage() == 8) goto DRAW_OVERLAY_ONLY; + if (overlay && overlay!= this && damage() == FL_DAMAGE_OVERLAY) goto DRAW_OVERLAY_ONLY; #endif #endif @@ -153,13 +153,13 @@ void Fl_Gl_Window::flush() { #if SWAP_TYPE == NODAMAGE // don't draw if only overlay damage or expose events: - if ((damage()&~0xA0) || !valid()) draw(); + if ((damage()&~(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE)) || !valid()) draw(); swap_buffers(); #elif SWAP_TYPE == COPY // don't draw if only the overlay is damaged: - if (damage() != 8 || !valid()) draw(); + if (damage() != FL_DAMAGE_OVERLAY || !valid()) draw(); swap_buffers(); #else // SWAP_TYPE == SWAP || SWAP_TYPE == UNDEFINED @@ -167,7 +167,7 @@ void Fl_Gl_Window::flush() { if (overlay == this) { // Use CopyPixels to act like SWAP_TYPE == COPY // don't draw if only the overlay is damaged: - if (damage1_ || damage() != 8 || !valid()) draw(); + if (damage1_ || damage() != FL_DAMAGE_OVERLAY || !valid()) draw(); // we use a seperate context for the copy because rasterpos must be 0 // and depth test needs to be off: static GLXContext ortho_context; @@ -216,7 +216,7 @@ void Fl_Gl_Window::flush() { // this faking of the overlay is incorrect but worked good for // one in-house program: - if (overlay != this || damage()!=8 || !Fl::pushed()) draw(); + if (overlay != this || damage()!=FL_DAMAGE_OVERLAY || !Fl::pushed()) draw(); if (overlay == this) draw_overlay(); glFlush(); -- cgit v1.2.3