LibGL: Correctly set scene ambient in glLightModelfv

This was only passing in the `R` value to the scene's ambient color,
which is incorrect.
This commit is contained in:
Jesse Buhagiar 2022-01-21 11:00:37 +11:00 committed by Andreas Kling
commit f885e01875
Notes: sideshowbarker 2024-07-17 20:11:13 +09:00

View file

@ -36,10 +36,11 @@ void glLightModelfv(GLenum pname, GLfloat const* params)
{
switch (pname) {
case GL_LIGHT_MODEL_AMBIENT:
g_gl_context->gl_light_model(pname, params[0], 0.0f, 0.0f, 0.0f);
g_gl_context->gl_light_model(pname, params[0], params[1], params[2], params[3]);
break;
default:
g_gl_context->gl_light_model(pname, params[0], params[1], params[2], params[3]);
g_gl_context->gl_light_model(pname, params[0], 0.0f, 0.0f, 0.0f);
break;
}
}