mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibGL+LibSoftGPU: Pass along lighting flag to Software GPU
This was currently only set in the OpenGL context, as the previous architecture did all of the transformation in LibGL before passing the transformed triangles onto the rasterizer. As this has now changed, and we require the vertex data to be in eye-space before we can apply lighting, we need to pass this flag along as well via the GPU options.
This commit is contained in:
parent
775ef000e0
commit
4035532ee8
Notes:
sideshowbarker
2024-07-17 21:06:24 +09:00
Author: https://github.com/Quaker762
Commit: 4035532ee8
Pull-request: https://github.com/SerenityOS/serenity/pull/11764
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/sunverwerth ✅
2 changed files with 5 additions and 0 deletions
|
@ -668,6 +668,8 @@ void SoftwareGLContext::gl_enable(GLenum capability)
|
|||
break;
|
||||
case GL_LIGHTING:
|
||||
m_lighting_enabled = true;
|
||||
rasterizer_options.lighting_enabled = true;
|
||||
update_rasterizer_options = true;
|
||||
break;
|
||||
case GL_NORMALIZE:
|
||||
m_normalize = true;
|
||||
|
@ -762,6 +764,8 @@ void SoftwareGLContext::gl_disable(GLenum capability)
|
|||
break;
|
||||
case GL_LIGHTING:
|
||||
m_lighting_enabled = false;
|
||||
rasterizer_options.lighting_enabled = false;
|
||||
update_rasterizer_options = true;
|
||||
break;
|
||||
case GL_LIGHT0:
|
||||
case GL_LIGHT1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue