mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibGL: Add support for GL_BLEND in glEnable() and glDisable()
This commit is contained in:
parent
279737642c
commit
d6e9b433cf
4 changed files with 22 additions and 1 deletions
|
@ -683,6 +683,11 @@ void SoftwareGLContext::gl_enable(GLenum capability)
|
|||
rasterizer_options.enable_depth_test = true;
|
||||
update_rasterizer_options = true;
|
||||
break;
|
||||
case GL_BLEND:
|
||||
m_blend_enabled = true;
|
||||
rasterizer_options.enable_blending = true;
|
||||
update_rasterizer_options = true;
|
||||
break;
|
||||
default:
|
||||
m_error = GL_INVALID_ENUM;
|
||||
break;
|
||||
|
@ -713,6 +718,11 @@ void SoftwareGLContext::gl_disable(GLenum capability)
|
|||
rasterizer_options.enable_depth_test = false;
|
||||
update_rasterizer_options = true;
|
||||
break;
|
||||
case GL_BLEND:
|
||||
m_blend_enabled = false;
|
||||
rasterizer_options.enable_blending = false;
|
||||
update_rasterizer_options = false;
|
||||
break;
|
||||
default:
|
||||
m_error = GL_INVALID_ENUM;
|
||||
break;
|
||||
|
@ -908,6 +918,11 @@ void SoftwareGLContext::gl_blend_func(GLenum src_factor, GLenum dst_factor)
|
|||
|
||||
m_blend_source_factor = src_factor;
|
||||
m_blend_destination_factor = dst_factor;
|
||||
|
||||
auto options = m_rasterizer.options();
|
||||
options.blend_source_factor = m_blend_source_factor;
|
||||
options.blend_destination_factor = m_blend_destination_factor;
|
||||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::present()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue