Browse Source

fix red-green confusion

David Rose 19 years ago
parent
commit
656b85eb8c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/osxdisplay/osxGraphicsPipe.cxx

+ 1 - 1
panda/src/osxdisplay/osxGraphicsPipe.cxx

@@ -144,8 +144,8 @@ create_cg_image(const PNMImage &pnm_image) {
       if (is_grayscale) {
       if (is_grayscale) {
         *dp++ = (xelval)(pnm_image.get_gray(xi, yi) * PGM_MAXMAXVAL);
         *dp++ = (xelval)(pnm_image.get_gray(xi, yi) * PGM_MAXMAXVAL);
       } else {
       } else {
-        *dp++ = (xelval)(pnm_image.get_green(xi, yi) * PGM_MAXMAXVAL);
         *dp++ = (xelval)(pnm_image.get_red(xi, yi) * PGM_MAXMAXVAL);
         *dp++ = (xelval)(pnm_image.get_red(xi, yi) * PGM_MAXMAXVAL);
+        *dp++ = (xelval)(pnm_image.get_green(xi, yi) * PGM_MAXMAXVAL);
         *dp++ = (xelval)(pnm_image.get_blue(xi, yi) * PGM_MAXMAXVAL);
         *dp++ = (xelval)(pnm_image.get_blue(xi, yi) * PGM_MAXMAXVAL);
       }
       }
       if (has_alpha) {
       if (has_alpha) {