Skip to content

Commit

Permalink
LibGL: Support local viewer light model
Browse files Browse the repository at this point in the history
We already had the implementation, but we were erroneously rejecting
`GL_LIGHT_MODEL_LOCAL_VIEWER` as a parameter to `glLightModel`.
  • Loading branch information
gmta authored and awesomekling committed Mar 6, 2022
1 parent c91e86e commit 53edb41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Userland/Libraries/LibGL/SoftwareGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2787,8 +2787,9 @@ void SoftwareGLContext::gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLflo
{
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_light_model, pname, x, y, z, w);

RETURN_WITH_ERROR_IF(!(pname == GL_LIGHT_MODEL_AMBIENT
|| pname == GL_LIGHT_MODEL_TWO_SIDE),
RETURN_WITH_ERROR_IF(pname != GL_LIGHT_MODEL_LOCAL_VIEWER
&& pname != GL_LIGHT_MODEL_TWO_SIDE
&& pname != GL_LIGHT_MODEL_AMBIENT,
GL_INVALID_ENUM);

auto lighting_params = m_rasterizer.light_model();
Expand Down

0 comments on commit 53edb41

Please sign in to comment.