1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:27:43 +00:00

LibGL: Clamp color in glClearColor to 0..1

This commit is contained in:
Jelle Raaijmakers 2022-02-21 01:30:23 +01:00 committed by Linus Groh
parent 44a3d5c101
commit d92047c74d

View file

@ -280,6 +280,7 @@ void SoftwareGLContext::gl_clear_color(GLclampf red, GLclampf green, GLclampf bl
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION); RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
m_clear_color = { red, green, blue, alpha }; m_clear_color = { red, green, blue, alpha };
m_clear_color.clamp(0.f, 1.f);
} }
void SoftwareGLContext::gl_clear_depth(GLdouble depth) void SoftwareGLContext::gl_clear_depth(GLdouble depth)