mesa: more info in error messages
authorBrian Paul <brianp@vmware.com>
Wed, 4 Feb 2009 21:22:12 +0000 (14:22 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 4 Feb 2009 23:33:25 +0000 (16:33 -0700)
src/mesa/main/buffers.c

index dc415c4f20c90e663df47567aa5f1dc488f9e088..7877ee004512821eb408e2af1b3f6ede19feaf1b 100644 (file)
@@ -247,13 +247,14 @@ _mesa_DrawBuffer(GLenum buffer)
       destMask = draw_buffer_enum_to_bitmask(buffer);
       if (destMask == BAD_MASK) {
          /* totally bogus buffer */
-         _mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffer(buffer)");
+         _mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffer(buffer=0x%x)", buffer);
          return;
       }
       destMask &= supportedMask;
       if (destMask == 0x0) {
          /* none of the named color buffers exist! */
-         _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(buffer)");
+         _mesa_error(ctx, GL_INVALID_OPERATION,
+                     "glDrawBuffer(buffer=0x%x)", buffer);
          return;
       }
    }