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:
parent
909ec41196
commit
f885e01875
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue