summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-01-13 03:01:42 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-13 12:13:58 +0100
commit9d4c2f630894fe480700028be37747c04c4d0b24 (patch)
tree4a6cc068c2ac27a2ef5f15a9103feaf2ac13d014 /Userland/Libraries/LibGL
parent8c28d167c9e8d7aa7a66f49efebf97aaaf9951a3 (diff)
downloadserenity-9d4c2f630894fe480700028be37747c04c4d0b24.zip
LibGL+LibSoftGPU: Calculate spotlight cutoff angle as degrees
We were storing the radians but never using that value in the GPU. We now directly use the degrees value.
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
index 1ffe138e75..c987df39bb 100644
--- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp
+++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
@@ -3007,7 +3007,6 @@ void SoftwareGLContext::sync_light_state()
light.spotlight_direction = current_light_state.spotlight_direction;
light.spotlight_exponent = current_light_state.spotlight_exponent;
light.spotlight_cutoff_angle = current_light_state.spotlight_cutoff_angle;
- light.spotlight_cutoff_angle_rads = current_light_state.spotlight_cutoff_angle_rads;
light.constant_attenuation = current_light_state.constant_attenuation;
light.linear_attenuation = current_light_state.linear_attenuation;
light.quadratic_attenuation = current_light_state.quadratic_attenuation;
@@ -3119,7 +3118,6 @@ void SoftwareGLContext::gl_lightf(GLenum light, GLenum pname, GLfloat param)
break;
case GL_SPOT_CUTOFF:
light_state.spotlight_cutoff_angle = param;
- light_state.spotlight_cutoff_angle_rads = param * (AK::Pi<float> / 180.0f);
break;
default:
VERIFY_NOT_REACHED();
@@ -3165,7 +3163,6 @@ void SoftwareGLContext::gl_lightfv(GLenum light, GLenum pname, GLfloat const* pa
break;
case GL_SPOT_CUTOFF:
light_state.spotlight_cutoff_angle = *params;
- light_state.spotlight_cutoff_angle_rads = *params * (AK::Pi<float> / 180.0f);
break;
case GL_SPOT_DIRECTION: {
FloatVector4 direction_vector = { params[0], params[1], params[2], 0.0f };