summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-05-09 20:42:45 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-05-09 20:42:45 +0000
commit62abec65c9a6e9b54ba5a09ee419dca31ca1b418 (patch)
treec74effd733cad9078cf33287f0721618baad406c
parentbb4f463d1c94b465f2214c27f71617e4c9b53b81 (diff)
fixed Y flip problem in read_rgba_pixels() (Frank Warmerdam)
-rw-r--r--src/mesa/drivers/windows/wmesa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c
index add2a4135bd..3d2aa8fff19 100644
--- a/src/mesa/drivers/windows/wmesa.c
+++ b/src/mesa/drivers/windows/wmesa.c
@@ -1,4 +1,4 @@
-/* $Id: wmesa.c,v 1.3.4.4 2001/04/26 19:13:56 brianp Exp $ */
+/* $Id: wmesa.c,v 1.3.4.5 2001/05/09 20:42:45 brianp Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
@@ -1085,7 +1085,8 @@ static void read_rgba_pixels( const GLcontext* ctx,
assert(Current->rgb_flag==GL_TRUE);
for (i=0; i<n; i++) {
if (mask[i]) {
- Color=GetPixel(DC,x[i],FLIP(y[i]));
+ GLint y2 = Current->Height - y[i] - 1;
+ Color=GetPixel(DC,x[i],y2);
rgba[i][RCOMP] = GetRValue(Color);
rgba[i][GCOMP] = GetGValue(Color);
rgba[i][BCOMP] = GetBValue(Color);