diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-11 17:41:03 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-11 17:41:03 +0000 |
commit | 8ad1076dc2afda8ed37e5a9f6a757583eba90375 (patch) | |
tree | 30bc52e2db6e089972d441a53c070e8377cb684d /src/mesa/drivers/x11 | |
parent | 9e84910749744efcba06670f622cc00d279f26f1 (diff) |
Another round of glRead/DrawBuffer() clean-ups and simplifications.
Replaced ctx->Color._DriverDrawBuffer with swrast->CurrentBuffer.
Replaced ctx->Pixel._DriverReadBuffer with ctx->Pixel._ReadSrcMask.
swrast->Driver.SetBuffer() takes FRONT/BACK_LEFT/RIGHT_BIT values now.
Added tokens and code for GL_AUX buffers, for completeness.
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 9be4aba69b..81a4b006a4 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.37 2002/10/04 19:10:12 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.38 2002/10/11 17:41:06 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ flush( GLcontext *ctx ) * lines, and triangles. */ static void -set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) +set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) { /* We can make this cast since the XMesaBuffer wraps GLframebuffer. * GLframebuffer is the first member in a XMesaBuffer struct. @@ -139,10 +139,10 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) /* * Now determine front vs back color buffer. */ - if (mode == GL_FRONT_LEFT) { + if (bufferBit == FRONT_LEFT_BIT) { target->buffer = target->frontbuffer; } - else if (mode == GL_BACK_LEFT) { + else if (bufferBit == BACK_LEFT_BIT) { ASSERT(target->db_state); if (target->backpixmap) { /* back buffer is a pixmape */ @@ -158,7 +158,8 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) } } else { - _mesa_problem(ctx, "invalid buffer in set_buffer() in xmesa2.c"); + _mesa_problem(ctx, "invalid buffer in set_buffer() in xm_dd.c"); + printf("bufferBit = 0x%x\n", bufferBit); return; } xmesa_update_span_funcs(ctx); |