LibGL: Clamp color in glClearColor
to 0..1
This commit is contained in:
parent
44a3d5c101
commit
d92047c74d
Notes:
sideshowbarker
2024-07-18 03:35:30 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/d92047c74d Pull-request: https://github.com/SerenityOS/serenity/pull/12695 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
||||
m_clear_color = { red, green, blue, alpha };
|
||||
m_clear_color.clamp(0.f, 1.f);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_clear_depth(GLdouble depth)
|
||||
|
|
Loading…
Add table
Reference in a new issue