init secondary color to (0,0,0,1). remove some redundant initializations.
[mesa.git] / src / mesa / main / convolve.c
index b7d2eeb20f9046efcc87bad5c166ad31786b2ecd..e6b19fabd42a477b2bdff24a2c36168a1c239c86 100644 (file)
@@ -1,9 +1,8 @@
-
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.1
  *
- * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -178,7 +177,7 @@ void GLAPIENTRY
 _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
 {
    GLint baseFormat;
-   GLint i, components;
+   GLint i;
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
@@ -215,8 +214,8 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G
       return;
    }
 
-   components = _mesa_components_in_format(format);
-   assert(components > 0);  /* this should have been caught earlier */
+   /* this should have been caught earlier */
+   assert(_mesa_components_in_format(format));
 
    ctx->Convolution2D.Format = format;
    ctx->Convolution2D.InternalFormat = internalFormat;
@@ -304,22 +303,18 @@ void GLAPIENTRY
 _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   struct gl_convolution_attrib *conv;
    GLuint c;
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
    switch (target) {
       case GL_CONVOLUTION_1D:
          c = 0;
-         conv = &ctx->Convolution1D;
          break;
       case GL_CONVOLUTION_2D:
          c = 1;
-         conv = &ctx->Convolution2D;
          break;
       case GL_SEPARABLE_2D:
          c = 2;
-         conv = &ctx->Separable2D;
          break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)");
@@ -403,22 +398,18 @@ void GLAPIENTRY
 _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   struct gl_convolution_attrib *conv;
    GLuint c;
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
    switch (target) {
       case GL_CONVOLUTION_1D:
          c = 0;
-         conv = &ctx->Convolution1D;
          break;
       case GL_CONVOLUTION_2D:
          c = 1;
-         conv = &ctx->Convolution2D;
          break;
       case GL_SEPARABLE_2D:
          c = 2;
-         conv = &ctx->Separable2D;
          break;
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)");