mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 21:10:30 +00:00
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:
parent
6d68f47495
commit
403c560a7a
Notes:
sideshowbarker
2024-07-17 02:57:40 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/403c560a7a Pull-request: https://github.com/SerenityOS/serenity/pull/16543 Issue: https://github.com/SerenityOS/serenity/issues/15814 Reviewed-by: https://github.com/FalseHonesty Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 2 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue