mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 21:42:19 +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
Notes:
sideshowbarker
2024-07-17 20:11:13 +09:00
Author: https://github.com/Quaker762
Commit: f885e01875
Pull-request: https://github.com/SerenityOS/serenity/pull/12036
Reviewed-by: https://github.com/gmta ✅
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