summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_buffers.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-03 16:57:58 +0000
committerBrian Paul <[email protected]>2005-09-03 16:57:58 +0000
commitacafeeb6dce74382fb3a48b83ab72bf67b7581ea (patch)
tree63bae8571a6008628384d37514932bfd17c2f8d4 /src/mesa/swrast/s_buffers.c
parent54be0763e1c24091ba522139e899d0254143ba7d (diff)
Remove last remnants of pre-renderbuffer code.
Diffstat (limited to 'src/mesa/swrast/s_buffers.c')
-rw-r--r--src/mesa/swrast/s_buffers.c100
1 files changed, 0 insertions, 100 deletions
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c
index b21642aa571..0247e1acab7 100644
--- a/src/mesa/swrast/s_buffers.c
+++ b/src/mesa/swrast/s_buffers.c
@@ -234,13 +234,6 @@ clear_color_buffers(GLcontext *ctx)
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers[0]; i++) {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][i];
-#if OLD_RENDERBUFFER
- /* SetBuffer will go away */
- if (swrast->Driver.SetBuffer)
- swrast->Driver.SetBuffer(ctx, ctx->DrawBuffer,
- ctx->DrawBuffer->_ColorDrawBit[0][i]);
-#endif
-
if (ctx->Visual.rgbMode) {
if (masking) {
clear_rgba_buffer_with_masking(ctx, rb);
@@ -258,9 +251,6 @@ clear_color_buffers(GLcontext *ctx)
}
}
}
-
- /* restore default read/draw buffer */
- _swrast_use_draw_buffer(ctx);
}
@@ -322,93 +312,3 @@ _swrast_Clear(GLcontext *ctx, GLbitfield mask,
RENDER_FINISH(swrast,ctx);
}
-
-
-/*
- * Fallback for ctx->Driver.DrawBuffer()
- */
-void
-_swrast_DrawBuffer( GLcontext *ctx, GLenum mode )
-{
- (void) mode;
- _swrast_use_draw_buffer(ctx);
-}
-
-
-/*
- * Fallback for ctx->Driver.DrawBuffers()
- */
-void
-_swrast_DrawBuffers( GLcontext *ctx, GLsizei n, const GLenum *buffers )
-{
- _swrast_use_draw_buffer(ctx);
-}
-
-
-/*
- * Setup things so that we read/write spans from the user-designated
- * read buffer (set via glReadPixels). We usually just have to call
- * this for glReadPixels, glCopyPixels, etc.
- *
- * XXX this will go away when the last OLD_RENDERBUFFER code is removed.
- * The swrast->CurrentBufferBit var can be totally removed then too.
- */
-void
-_swrast_use_read_buffer( GLcontext *ctx )
-{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
-
- /* Do this so the software-emulated alpha plane span functions work! */
- swrast->CurrentBufferBit = ctx->ReadBuffer->_ColorReadBufferMask;
- /* Tell the device driver where to read/write spans */
- if (swrast->Driver.SetBuffer)
- swrast->Driver.SetBuffer(ctx, ctx->ReadBuffer, swrast->CurrentBufferBit);
-}
-
-
-/*
- * Setup things so that we read/write spans from the default draw buffer.
- * This is the usual mode that Mesa's software rasterizer operates in.
- *
- * XXX this will go away when the last OLD_RENDERBUFFER code is removed.
- * The swrast->CurrentBufferBit var can be totally removed then too.
- */
-void
-_swrast_use_draw_buffer( GLcontext *ctx )
-{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
-
- /* The user can specify rendering to zero, one, two, or four color
- * buffers simultaneously with glDrawBuffer()!
- * We don't expect the span/point/line/triangle functions to deal with
- * that mess so we'll iterate over the multiple buffers as needed.
- * But usually we only render to one color buffer at a time.
- * We set ctx->Color._DriverDrawBuffer to that buffer and tell the
- * device driver to use that buffer.
- * Look in s_span.c's multi_write_rgba_span() function to see how
- * we loop over multiple color buffers when needed.
- */
-
- if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_FRONT_LEFT)
- swrast->CurrentBufferBit = BUFFER_BIT_FRONT_LEFT;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_BACK_LEFT)
- swrast->CurrentBufferBit = BUFFER_BIT_BACK_LEFT;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_FRONT_RIGHT)
- swrast->CurrentBufferBit = BUFFER_BIT_FRONT_RIGHT;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_BACK_RIGHT)
- swrast->CurrentBufferBit = BUFFER_BIT_BACK_RIGHT;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX0)
- swrast->CurrentBufferBit = BUFFER_BIT_AUX0;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX1)
- swrast->CurrentBufferBit = BUFFER_BIT_AUX1;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX2)
- swrast->CurrentBufferBit = BUFFER_BIT_AUX2;
- else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX3)
- swrast->CurrentBufferBit = BUFFER_BIT_AUX3;
- else
- /* glDrawBuffer(GL_NONE) */
- swrast->CurrentBufferBit = BUFFER_BIT_FRONT_LEFT; /* we always have this buffer */
-
- if (swrast->Driver.SetBuffer)
- swrast->Driver.SetBuffer(ctx, ctx->DrawBuffer, swrast->CurrentBufferBit);
-}