diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-11 00:02:16 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-11 00:02:16 +0000 |
commit | d54d4633fdfafef71d61486b5d740a237f380055 (patch) | |
tree | c9b852ffce1bf561961a46326bd7ee59d2e0b4a2 | |
parent | 813c96f4584f90a64b093f21486b71d48f9c117f (diff) |
check mode for no change in _mesa_Read/DrawBuffer()
-rw-r--r-- | src/mesa/main/buffers.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 20a1c2ee22..f7edb1b855 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -1,4 +1,4 @@ -/* $Id: buffers.c,v 1.38 2002/10/04 19:10:07 brianp Exp $ */ +/* $Id: buffers.c,v 1.39 2002/10/11 00:02:16 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -144,10 +144,12 @@ _mesa_DrawBuffer( GLenum mode ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */ - if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); + if (ctx->Color.DrawBuffer == mode) + return; /* no change */ + /* * Do error checking and compute the _DrawDestMask bitfield. */ @@ -262,6 +264,9 @@ _mesa_ReadBuffer( GLenum mode ) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); + if (ctx->Pixel.ReadBuffer == mode) + return; /* no change */ + switch (mode) { case GL_AUX0: case GL_AUX1: |