# HG changeset patch # User nkeynes # Date 1169730203 0 # Node ID 4b453d68e9ae90681dd9340eb3cb88913ed2e03c # Parent 8da80d8342c55ea93d50f44cc0c6b1cce784f28b Fix ARGB1555 texture --- a/src/display.c Thu Jan 25 12:55:31 2007 +0000 +++ b/src/display.c Thu Jan 25 13:03:23 2007 +0000 @@ -1,5 +1,5 @@ /** - * $Id: display.c,v 1.4 2007-01-25 11:46:35 nkeynes Exp $ + * $Id: display.c,v 1.5 2007-01-25 13:03:23 nkeynes Exp $ * * Generic support for keyboard and other input sources. The active display * driver is expected to deliver events here, where they're translated and @@ -34,7 +34,7 @@ * Colour format information */ struct colour_format colour_formats[] = { - { GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_RGBA, GL_RGB5_A1, 2 }, + { GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_BGRA, GL_RGB5_A1, 2 }, { GL_UNSIGNED_SHORT_5_6_5, GL_RGB, GL_RGB5, 2 }, { GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_BGRA, GL_RGBA4, 2 }, { GL_UNSIGNED_INT_8_8_8_8_REV, GL_BGRA, GL_RGBA8, 4 }, /* YUV decoded to ARGB8888 */ --- a/src/pvr2/texcache.c Thu Jan 25 12:55:31 2007 +0000 +++ b/src/pvr2/texcache.c Thu Jan 25 13:03:23 2007 +0000 @@ -1,5 +1,5 @@ /** - * $Id: texcache.c,v 1.22 2007-01-25 12:55:31 nkeynes Exp $ + * $Id: texcache.c,v 1.23 2007-01-25 13:03:23 nkeynes Exp $ * * Texture cache. Responsible for maintaining a working set of OpenGL * textures. @@ -311,7 +311,7 @@ switch( MMIO_READ( PVR2, RENDER_PALETTE ) & 0x03 ) { case 0: /* ARGB1555 */ intFormat = GL_RGB5_A1; - format = GL_RGBA; + format = GL_BGRA; type = GL_UNSIGNED_SHORT_1_5_5_5_REV; break; case 1: /* RGB565 */ @@ -335,7 +335,7 @@ case PVR2_TEX_FORMAT_ARGB1555: intFormat = GL_RGB5_A1; - format = GL_RGBA; + format = GL_BGRA; type = GL_UNSIGNED_SHORT_1_5_5_5_REV; break; case PVR2_TEX_FORMAT_RGB565: