mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibGL: Use clamp<float>
for depth range
We get `double`s as input, so convert them to `float` first.
This commit is contained in:
parent
db0616c67a
commit
506a857c3e
Notes:
sideshowbarker
2024-07-17 18:23:35 +09:00
Author: https://github.com/gmta
Commit: 506a857c3e
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 2 additions and 2 deletions
|
@ -2341,8 +2341,8 @@ void SoftwareGLContext::gl_depth_range(GLdouble min, GLdouble max)
|
|||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
|
||||
auto options = m_rasterizer.options();
|
||||
options.depth_min = clamp(min, 0.f, 1.f);
|
||||
options.depth_max = clamp(max, 0.f, 1.f);
|
||||
options.depth_min = clamp<float>(min, 0.f, 1.f);
|
||||
options.depth_max = clamp<float>(max, 0.f, 1.f);
|
||||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue