mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
LibAccelGfx: Set blending for alpha separately to be sum of src and dst
With this change we match blending in LibGfx and it fixes rendering on all websites that use opacity < 1.
This commit is contained in:
parent
c55d8a9971
commit
2361ce25a0
3 changed files with 9 additions and 9 deletions
|
@ -36,10 +36,10 @@ static GLenum to_gl_enum(BlendFactor factor)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void enable_blending(BlendFactor source, BlendFactor destination)
|
||||
void enable_blending(BlendFactor source, BlendFactor destination, BlendFactor source_alpha, BlendFactor destination_alpha)
|
||||
{
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(to_gl_enum(source), to_gl_enum(destination));
|
||||
glBlendFuncSeparate(to_gl_enum(source), to_gl_enum(destination), to_gl_enum(source_alpha), to_gl_enum(destination_alpha));
|
||||
verify_no_error();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue