mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +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
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:
|
case GL_LIGHT_MODEL_LOCAL_VIEWER:
|
||||||
// 0 means the viewer is at infinity
|
// 0 means the viewer is at infinity
|
||||||
// 1 means they're in local (eye) space
|
// 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;
|
break;
|
||||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||||
VERIFY(y == 0.0f && z == 0.0f && w == 0.0f);
|
lighting_params.two_sided_lighting = (x != 0.f);
|
||||||
lighting_params.two_sided_lighting = x;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue