[Mesa-dev] [PATCH 4/5] mesa: remove unneeded glReadPixels(GL_COLOR_INDEX) code

Brian Paul brianp at vmware.com
Fri Feb 3 07:32:00 PST 2012


---
 src/mesa/main/readpix.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index b753e40..3882e09 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -643,17 +643,11 @@ _mesa_error_check_format_type(struct gl_context *ctx, GLenum format,
          }
       }
       else {
-         /* reading */
-         if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) {
-            _mesa_error(ctx, GL_INVALID_OPERATION,
-                        "glReadPixels(no color buffer)");
-            return GL_TRUE;
-         }
          /* We no longer support CI-mode color buffers so trying to read
           * GL_COLOR_INDEX pixels is always an error.
           */
          _mesa_error(ctx, GL_INVALID_OPERATION,
-                     "glReadPixels(color buffer is RGB)");
+                     "glReadPixels(no color index buffer)");
          return GL_TRUE;
       }
       break;
-- 
1.7.3.4



More information about the mesa-dev mailing list