mesa: simplify _mesa_Lightfv
authorThomas Faller <tfaller1@gmx.de>
Fri, 29 Apr 2016 16:54:08 +0000 (10:54 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 29 Apr 2016 17:08:01 +0000 (11:08 -0600)
Signed-off-by: Thomas Faller <tfaller1@gmx.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/light.c

index 14b4b04162b01bbf6462463010344b374a7f4429..4a8dee3f649ffaa3a37a195c65b7e374fcafe6fa 100644 (file)
@@ -250,17 +250,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
       }
       break;
    case GL_CONSTANT_ATTENUATION:
-      if (params[0] < 0.0F) {
-        _mesa_error(ctx, GL_INVALID_VALUE, "glLight");
-        return;
-      }
-      break;
    case GL_LINEAR_ATTENUATION:
-      if (params[0] < 0.0F) {
-        _mesa_error(ctx, GL_INVALID_VALUE, "glLight");
-        return;
-      }
-      break;
    case GL_QUADRATIC_ATTENUATION:
       if (params[0] < 0.0F) {
         _mesa_error(ctx, GL_INVALID_VALUE, "glLight");