[OPENGL32] Fix Red and Green Color Swap (#3478)
authorDoug Lyons <douglyons@douglyons.com>
Mon, 22 Feb 2021 16:45:33 +0000 (10:45 -0600)
committerGitHub <noreply@github.com>
Mon, 22 Feb 2021 16:45:33 +0000 (17:45 +0100)
CORE-16221

dll/opengl/opengl32/swimpl.c

index 7f2808d..ec008b5 100644 (file)
@@ -1241,7 +1241,7 @@ static void read_color_span_##__bpp(GLcontext* ctx,
     {                                                                           \
         Buffer -= __pixel_size;                                                 \
         UNPACK_COLOR_##__bpp(GET_PIXEL_##__bpp((__type*)Buffer),                \
-                &blue[n], &green[n], &red[n]);                                  \
+                &red[n], &green[n], &blue[n]);                                  \
         alpha[n] = 0;                                                           \
     }                                                                           \
 }
@@ -1294,7 +1294,7 @@ static void read_color_pixels_##__bpp(GLcontext* ctx,
             BYTE *Buffer = fb->BackBuffer + y[n] * WIDTH_BYTES_ALIGN32(fb->width, __bpp)    \
                     + x[n] * __pixel_size;                                                  \
             UNPACK_COLOR_##__bpp(GET_PIXEL_##__bpp((__type*)Buffer),                        \
-                    &blue[n], &green[n], &red[n]);                                          \
+                    &red[n], &green[n], &blue[n]);                                          \
             alpha[n] = 0;                                                                   \
         }                                                                                   \
     }                                                                                       \