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:
parent
db0616c67a
commit
506a857c3e
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