diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 773e7bf8a9..1728b0516b 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -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: diff --git a/Userland/Libraries/LibSoftGPU/Device.h b/Userland/Libraries/LibSoftGPU/Device.h index b8f6299b2c..e39c59f9b4 100644 --- a/Userland/Libraries/LibSoftGPU/Device.h +++ b/Userland/Libraries/LibSoftGPU/Device.h @@ -69,6 +69,7 @@ struct RasterizerOptions { u8 texcoord_generation_enabled_coordinates { TexCoordGenerationCoordinate::None }; Array texcoord_generation_config {}; Gfx::IntRect viewport; + bool lighting_enabled { false }; }; struct LightModelParameters {