1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:58:12 +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:
Jelle Raaijmakers 2022-01-28 22:48:29 +01:00 committed by Linus Groh
parent db0616c67a
commit 506a857c3e

View file

@ -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);
}