diff options
author | Daniel Borca <[email protected]> | 2004-07-21 08:46:55 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-07-21 08:46:55 +0000 |
commit | 1635040a9e4fcf20b421ff2a6124ee777c7eef4f (patch) | |
tree | f046852fa72f6d7d06995f6311fea5a7a037c095 /src/mesa/drivers/glide | |
parent | 15a0b086b409363e74a66afae8987d39dd75b48f (diff) |
partial GL_BLEND for Voodoo1
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index fd7c840eb8d..a1c018a38e6 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -647,16 +647,26 @@ fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) colorComb.Factor = GR_COMBINE_FACTOR_NONE; colorComb.Other = GR_COMBINE_OTHER_NONE; } else { - /* [dBorca] Hack alert: - * only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB) - */ if (fxMesa->type >= GR_SSTTYPE_Voodoo2) { colorComb.Function = GR_COMBINE_FUNCTION_BLEND; colorComb.Factor = GR_COMBINE_FACTOR_TEXTURE_RGB; colorComb.Other = GR_COMBINE_OTHER_CONSTANT; + } else if (ifmt == GL_INTENSITY) { + /* just a hack: RGB == ALPHA */ + colorComb.Function = GR_COMBINE_FUNCTION_BLEND; + colorComb.Factor = GR_COMBINE_FACTOR_TEXTURE_ALPHA; + colorComb.Other = GR_COMBINE_OTHER_CONSTANT; } else { + /* [dBorca] Hack alert: + * only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB) + * These settings assume that the TexEnv color is black + * and incoming fragment color is white. + */ + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER; + colorComb.Factor = GR_COMBINE_FACTOR_ONE; + colorComb.Other = GR_COMBINE_OTHER_TEXTURE; + colorComb.Invert = FXTRUE; _mesa_problem(NULL, "can't GL_BLEND with SST1"); - return; } } @@ -704,7 +714,7 @@ fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) } else { /* sum of texel and fragment alpha */ - alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, + alphaComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL; alphaComb.Factor = GR_COMBINE_FACTOR_ONE; alphaComb.Other = GR_COMBINE_OTHER_TEXTURE; } @@ -717,7 +727,7 @@ fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) } else { /* sum of texel and fragment rgb */ - colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, + colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL; colorComb.Factor = GR_COMBINE_FACTOR_ONE; colorComb.Other = GR_COMBINE_OTHER_TEXTURE; } |