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

LibGL: Implement glDepthMask

This commit is contained in:
Stephan Unverwerth 2021-08-13 01:06:26 +02:00 committed by Andreas Kling
parent 010e344a8e
commit 5f863016ca
7 changed files with 26 additions and 2 deletions

View file

@ -1392,6 +1392,17 @@ void SoftwareGLContext::gl_get_floatv(GLenum pname, GLfloat* params)
}
}
void SoftwareGLContext::gl_depth_mask(GLboolean flag)
{
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_depth_mask, flag);
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
auto options = m_rasterizer.options();
options.enable_depth_write = (flag != GL_FALSE);
m_rasterizer.set_options(options);
}
void SoftwareGLContext::present()
{
m_rasterizer.blit_to(*m_frontbuffer);