summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 17:53:09 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 17:53:09 +0000
commit512332670a87377ba6b705232d22a67681fba3ff (patch)
tree82b915d0cbcb2cefbe0fe7088dc6e5ad398e9306 /src/Fl_Gl_Window.cxx
parent33ee986a7b69e05e1fe110c685747381bba481a9 (diff)
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
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx10
1 files changed, 5 insertions, 5 deletions
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();