From 506a857c3ef1b7abfb5454d55a973891524ac5ff Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Fri, 28 Jan 2022 22:48:29 +0100 Subject: [PATCH] LibGL: Use `clamp` for depth range We get `double`s as input, so convert them to `float` first. --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 89c3de6de1..221f2acabc 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -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(min, 0.f, 1.f); + options.depth_max = clamp(max, 0.f, 1.f); m_rasterizer.set_options(options); }