From a94ee16534539febc91d81374ca342deab64142a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Sep 2000 22:07:20 +0000 Subject: [PATCH] replaced GL_RGBA with GL_BGRA for GL_UNSIGNED_SHORT_1_5_5_5_REV datatype --- src/mesa/main/texutil.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c index 33295fd..9628816 100644 --- a/src/mesa/main/texutil.c +++ b/src/mesa/main/texutil.c @@ -1,4 +1,4 @@ -/* $Id: texutil.c,v 1.6 2000/08/29 23:30:53 brianp Exp $ */ +/* $Id: texutil.c,v 1.7 2000/09/13 22:07:20 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -81,7 +81,10 @@ * GL_RGBA GL_UNSIGNED_BYTE MESA_A4_R4_G4_B4 * GL_BGRA GL_UNSIGNED_SHORT_4_4_4_4_REV MESA_A4_R4_G4_B4 * GL_BGRA GL_UNSIGHED_SHORT_1_5_5_5_REV MESA_A1_R5_G5_B5 + * GL_RGBA GL_UNSIGNED_BYTE MESA_A1_R5_G5_B5 * GL_BGRA GL_UNSIGNED_INT_8_8_8_8_REV MESA_A8_R8_G8_B8 + * GL_RGBA GL_UNSIGNED_BYTE MESA_A8_R8_G8_B8 + * GL_RGB GL_UNSIGNED_BYTE MESA_A8_R8_G8_B8 * more to be added for new drivers... * * Notes: @@ -500,7 +503,7 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat, case MESA_A1_R5_G5_B5: /* store as 16-bit texels (GR_TEXFMT_ARGB_1555) */ - if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){ + if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){ /* special, optimized case */ if (wScale == 1 && hScale == 1) { const GLubyte *src = _mesa_image_address(packing, srcImage, @@ -1101,7 +1104,7 @@ _mesa_convert_texsubimage(MesaIntTexFormat dstFormat, case MESA_A1_R5_G5_B5: /* store as 16-bit texels (GR_TEXFMT_ARGB_1555) */ - if (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){ + if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){ /* special, optimized case */ if (wScale == 1 && hScale == 1) { const GLubyte *src = _mesa_image_address(packing, srcImage, -- 2.7.4