mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
i965: take the secondary color into account when drawing
bitmap. fix#10688
This commit is contained in:
parent
241b7bc0a3
commit
0aedb9a204
1 changed files with 12 additions and 5 deletions
|
|
@ -168,7 +168,8 @@ do_blit_bitmap( GLcontext *ctx,
|
|||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
struct intel_region *dst = intel_drawbuf_region(intel);
|
||||
|
||||
GLfloat tmpColor[4];
|
||||
|
||||
union {
|
||||
GLuint ui;
|
||||
GLubyte ub[4];
|
||||
|
|
@ -183,10 +184,16 @@ do_blit_bitmap( GLcontext *ctx,
|
|||
return GL_TRUE; /* even though this is an error, we're done */
|
||||
}
|
||||
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[0], ctx->Current.RasterColor[2]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[1], ctx->Current.RasterColor[1]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[2], ctx->Current.RasterColor[0]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[3], ctx->Current.RasterColor[3]);
|
||||
COPY_4V(tmpColor, ctx->Current.RasterColor);
|
||||
|
||||
if (NEED_SECONDARY_COLOR(ctx)) {
|
||||
ADD_3V(tmpColor, tmpColor, ctx->Current.RasterSecondaryColor);
|
||||
}
|
||||
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[0], tmpColor[2]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[1], tmpColor[1]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[2], tmpColor[0]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(color.ub[3], tmpColor[3]);
|
||||
|
||||
/* Does zoom apply to bitmaps?
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue