diff options
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r-- | src/mesa/drivers/glide/fxdd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 71e11dfd14d..9c0fc4de537 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -403,10 +403,16 @@ static GLboolean fxDDDrawBitMap(GLcontext *ctx, GLint px, GLint py, g=(GLint)(ctx->Current.RasterColor[1]*255.0f); b=(GLint)(ctx->Current.RasterColor[2]*255.0f); a=(GLint)(ctx->Current.RasterColor[3]*255.0f); - color=(FxU16) - ( ((FxU16)0xf8 & b) <<(11-3)) | - ( ((FxU16)0xfc & g) <<(5-3+1)) | - ( ((FxU16)0xf8 & r) >> 3); + if (fxMesa->bgrOrder) + color=(FxU16) + ( ((FxU16)0xf8 & b) <<(11-3)) | + ( ((FxU16)0xfc & g) <<(5-3+1)) | + ( ((FxU16)0xf8 & r) >> 3); + else + color=(FxU16) + ( ((FxU16)0xf8 & r) <<(11-3)) | + ( ((FxU16)0xfc & g) <<(5-3+1)) | + ( ((FxU16)0xf8 & b) >> 3); stride=info.strideInBytes>>1; |