fix a few more glitches from last big check-in
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Jul 2003 21:21:30 +0000 (21:21 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 23 Jul 2003 21:21:30 +0000 (21:21 +0000)
src/mesa/main/image.c
src/mesa/main/pixel.c
src/mesa/main/state.c

index 171efb5..b9f026d 100644 (file)
@@ -979,11 +979,11 @@ _mesa_pack_float_rgba_span( GLcontext *ctx,
       }
       /* update histogram count */
       if (transferOps & IMAGE_HISTOGRAM_BIT) {
-/*          _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+         _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
       }
       /* min/max here */
       if (transferOps & IMAGE_MIN_MAX_BIT) {
-/*          _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+         _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
          if (ctx->MinMax.Sink) {
             UNDEFARRAY(rgbaCopy);  /* mac 32k limitation */
             return;
@@ -2852,11 +2852,11 @@ _mesa_unpack_chan_color_span( GLcontext *ctx,
          }
          /* update histogram count */
          if (transferOps & IMAGE_HISTOGRAM_BIT) {
-/*             _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+            _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
          }
          /* min/max here */
          if (transferOps & IMAGE_MIN_MAX_BIT) {
-/*             _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+            _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
          }
       }
 
@@ -3129,11 +3129,11 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
          }
          /* update histogram count */
          if (transferOps & IMAGE_HISTOGRAM_BIT) {
-/*             _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+            _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
          }
          /* min/max here */
          if (transferOps & IMAGE_MIN_MAX_BIT) {
-/*             _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba); */
+            _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
          }
       }
 
index 31ab8d7..80ddeb2 100644 (file)
@@ -1502,6 +1502,8 @@ void _mesa_init_pixel( GLcontext * ctx )
    ctx->Pack.SkipImages = 0;
    ctx->Pack.SwapBytes = GL_FALSE;
    ctx->Pack.LsbFirst = GL_FALSE;
+   ctx->Pack.ClientStorage = GL_FALSE;
+   ctx->Pack.Invert = GL_FALSE;
    ctx->Unpack.Alignment = 4;
    ctx->Unpack.RowLength = 0;
    ctx->Unpack.ImageHeight = 0;
@@ -1510,6 +1512,8 @@ void _mesa_init_pixel( GLcontext * ctx )
    ctx->Unpack.SkipImages = 0;
    ctx->Unpack.SwapBytes = GL_FALSE;
    ctx->Unpack.LsbFirst = GL_FALSE;
+   ctx->Unpack.ClientStorage = GL_FALSE;
+   ctx->Unpack.Invert = GL_FALSE;
 
    if (ctx->Visual.doubleBufferMode) {
       ctx->Pixel.ReadBuffer = GL_BACK;
index 2683556..b8eb080 100644 (file)
@@ -731,13 +731,6 @@ _mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
 /*@{*/
 
 
-
-
-
-
-
-
-
 /*
  * Update items which depend on vertex/fragment programs.
  */
@@ -786,12 +779,13 @@ void _mesa_update_state( GLcontext *ctx )
    if (new_state & _NEW_LIGHT)
       _mesa_update_lighting( ctx );
 
+   if (new_state & _IMAGE_NEW_TRANSFER_STATE)
+      _mesa_update_pixel( ctx, new_state );
 
    if (new_state & _NEW_PROGRAM)
       update_program( ctx );
 
-
-   /* ctx->_NeedEyeCoords is now uptodate.
+   /* ctx->_NeedEyeCoords is now up to date.
     *
     * If the truth value of this variable has changed, update for the
     * new lighting space and recompute the positions of lights and the