1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00

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
parent 909ec41196
commit f885e01875

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;
}
}