瀏覽代碼

check mode for no change in _mesa_Read/DrawBuffer()

tags/mesa_4_1
Brian Paul 23 年之前
父節點
當前提交
d54d4633fd
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      src/mesa/main/buffers.c

+ 7
- 2
src/mesa/main/buffers.c 查看文件

/* $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 * Mesa 3-D graphics library
GET_CURRENT_CONTEXT(ctx); GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */



if (MESA_VERBOSE & VERBOSE_API) if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); _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. * Do error checking and compute the _DrawDestMask bitfield.
*/ */
if (MESA_VERBOSE & VERBOSE_API) if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode)); _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode));


if (ctx->Pixel.ReadBuffer == mode)
return; /* no change */

switch (mode) { switch (mode) {
case GL_AUX0: case GL_AUX0:
case GL_AUX1: case GL_AUX1:

Loading…
取消
儲存