aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
commit4e1588b6805ee5c7cd34e733cd1eff098d063b95 (patch)
tree763d6761b0131ecd36be7b0d48d2e644b8a25c95 /mesalib/src/mesa/main/attrib.c
parenta69f20daead874a20fad57a4fadd99df393f28d6 (diff)
parentaee5cfef9a419ee2845d66b0c31e476880bea663 (diff)
downloadvcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.gz
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.bz2
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/attrib.c')
-rw-r--r--mesalib/src/mesa/main/attrib.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index 3a6239afd..363213c71 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -879,10 +879,10 @@ _mesa_PopAttrib(void)
color = (const struct gl_colorbuffer_attrib *) attr->data;
_mesa_ClearIndex((GLfloat) color->ClearIndex);
- _mesa_ClearColor(color->ClearColor[0],
- color->ClearColor[1],
- color->ClearColor[2],
- color->ClearColor[3]);
+ _mesa_ClearColor(color->ClearColorUnclamped[0],
+ color->ClearColorUnclamped[1],
+ color->ClearColorUnclamped[2],
+ color->ClearColorUnclamped[3]);
_mesa_IndexMask(color->IndexMask);
if (!ctx->Extensions.EXT_draw_buffers2) {
_mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0),
@@ -930,7 +930,7 @@ _mesa_PopAttrib(void)
_mesa_DrawBuffer(color->DrawBuffer[0]);
}
_mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled);
- _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef);
+ _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRefUnclamped);
if (ctx->Color.BlendEnabled != color->BlendEnabled) {
if (ctx->Extensions.EXT_draw_buffers2) {
GLuint i;
@@ -976,16 +976,18 @@ _mesa_PopAttrib(void)
color->Blend[0].EquationA);
}
}
- _mesa_BlendColor(color->BlendColor[0],
- color->BlendColor[1],
- color->BlendColor[2],
- color->BlendColor[3]);
+ _mesa_BlendColor(color->BlendColorUnclamped[0],
+ color->BlendColorUnclamped[1],
+ color->BlendColorUnclamped[2],
+ color->BlendColorUnclamped[3]);
_mesa_LogicOp(color->LogicOp);
_mesa_set_enable(ctx, GL_COLOR_LOGIC_OP,
color->ColorLogicOpEnabled);
_mesa_set_enable(ctx, GL_INDEX_LOGIC_OP,
color->IndexLogicOpEnabled);
_mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
+ _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor);
+ _mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
}
break;
case GL_CURRENT_BIT:
@@ -1108,6 +1110,7 @@ _mesa_PopAttrib(void)
/* materials */
memcpy(&ctx->Light.Material, &light->Material,
sizeof(struct gl_material));
+ _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor);
}
break;
case GL_LINE_BIT: