diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-12-09 16:23:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-20 10:42:31 +0100 |
commit | 403c560a7ae3d1a3e4c20224447fe4f48499305f (patch) | |
tree | 6e759dc310589011841b901b7a2121c3130904cd /Userland/Libraries/LibGL | |
parent | 6d68f474953f7da24ff5a16a9069182ae2b0628f (diff) | |
download | serenity-403c560a7ae3d1a3e4c20224447fe4f48499305f.zip |
LibGL: Correct `GL_LIGHT_MODEL_LOCAL_VIEWER` comparison
We were comparing the `x` parameter to `1.f` instead of `0.f`.
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r-- | Userland/Libraries/LibGL/Lighting.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGL/Lighting.cpp b/Userland/Libraries/LibGL/Lighting.cpp index 97eb0f4894..638a27bba0 100644 --- a/Userland/Libraries/LibGL/Lighting.cpp +++ b/Userland/Libraries/LibGL/Lighting.cpp @@ -179,11 +179,10 @@ void GLContext::gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GL case GL_LIGHT_MODEL_LOCAL_VIEWER: // 0 means the viewer is at infinity // 1 means they're in local (eye) space - lighting_params.viewer_at_infinity = (x != 1.0f); + lighting_params.viewer_at_infinity = (x == 0.f); break; case GL_LIGHT_MODEL_TWO_SIDE: - VERIFY(y == 0.0f && z == 0.0f && w == 0.0f); - lighting_params.two_sided_lighting = x; + lighting_params.two_sided_lighting = (x != 0.f); break; default: VERIFY_NOT_REACHED(); |