1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibGL: Implement glColorMask

This commit is contained in:
Jesse Buhagiar 2021-08-13 22:03:39 +10:00 committed by Linus Groh
parent fa8e9cb683
commit 8157e7740b
7 changed files with 41 additions and 3 deletions

View file

@ -383,7 +383,7 @@ static void rasterize_triangle(const RasterizerOptions& options, Gfx::Bitmap& re
+ float_dst * dst_factor_dst_color
+ FloatVector4(float_dst.w(), float_dst.w(), float_dst.w(), float_dst.w()) * dst_factor_dst_alpha;
*dst = to_rgba32(*src * src_factor + float_dst * dst_factor);
*dst = (*dst & ~options.color_mask) | (to_rgba32(*src * src_factor + float_dst * dst_factor) & options.color_mask);
}
}
} else {
@ -395,7 +395,7 @@ static void rasterize_triangle(const RasterizerOptions& options, Gfx::Bitmap& re
if (~pixel_mask[y] & (1 << x))
continue;
*dst = to_rgba32(*src);
*dst = (*dst & ~options.color_mask) | (to_rgba32(*src) & options.color_mask);
}
}
}