summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa/src/texture.c
diff options
context:
space:
mode:
authordawes <dawes>2001-07-30 14:29:21 +0000
committerdawes <dawes>2001-07-30 14:29:21 +0000
commit27f4b9bfe70a53f61a40ae1134282356a17ecf06 (patch)
treeba40dc914e2bfd54ff21b2747cd2144b1fba781c /xc/extras/Mesa/src/texture.c
parentfa75268be48b8af92f699da86665fe72d3f29691 (diff)
Merge from trunk.
Diffstat (limited to 'xc/extras/Mesa/src/texture.c')
-rw-r--r--xc/extras/Mesa/src/texture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xc/extras/Mesa/src/texture.c b/xc/extras/Mesa/src/texture.c
index 6a2b2dfb1..e361a1196 100644
--- a/xc/extras/Mesa/src/texture.c
+++ b/xc/extras/Mesa/src/texture.c
@@ -2063,10 +2063,12 @@ _mesa_texture_combine(const GLcontext *ctx,
const GLubyte red = FLOAT_TO_UBYTE(textureUnit->EnvColor[0]);
const GLubyte green = FLOAT_TO_UBYTE(textureUnit->EnvColor[1]);
const GLubyte blue = FLOAT_TO_UBYTE(textureUnit->EnvColor[2]);
+ const GLubyte alpha = FLOAT_TO_UBYTE(textureUnit->EnvColor[3]);
for (i = 0; i < n; i++) {
c[i][RCOMP] = red;
c[i][GCOMP] = green;
c[i][BCOMP] = blue;
+ c[i][ACOMP] = alpha;
}
argRGB[j] = ccolor[j];
}
@@ -2079,6 +2081,7 @@ _mesa_texture_combine(const GLcontext *ctx,
GLubyte (*src)[4] = argRGB[j];
GLubyte (*dst)[4] = ccolor[j];
+ /* point to new arg[j] storage */
argRGB[j] = ccolor[j];
if (textureUnit->CombineOperandRGB[j] == GL_ONE_MINUS_SRC_COLOR) {
@@ -2089,7 +2092,6 @@ _mesa_texture_combine(const GLcontext *ctx,
}
}
else if (textureUnit->CombineOperandRGB[j] == GL_SRC_ALPHA) {
- src = argA[j];
for (i = 0; i < n; i++) {
dst[i][RCOMP] = src[i][ACOMP];
dst[i][GCOMP] = src[i][ACOMP];
@@ -2097,7 +2099,6 @@ _mesa_texture_combine(const GLcontext *ctx,
}
}
else { /* GL_ONE_MINUS_SRC_ALPHA */
- src = argA[j];
for (i = 0; i < n; i++) {
dst[i][RCOMP] = 255 - src[i][ACOMP];
dst[i][GCOMP] = 255 - src[i][ACOMP];