LibGL: Correct GL_LIGHT_MODEL_LOCAL_VIEWER comparison

We were comparing the `x` parameter to `1.f` instead of `0.f`.
This commit is contained in:
Jelle Raaijmakers 2022-12-09 16:23:23 +01:00 committed by Andreas Kling
parent 6d68f47495
commit 403c560a7a
Notes: sideshowbarker 2024-07-17 02:57:40 +09:00

View file

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