Overhaul of glRead/DrawBuffer() code. Now, swrast->Driver.SetBuffer()

indicates the read AND draw color buffer for all software rasterization.
Lots of related clean-ups.  See RELNOTES-4.1 for details.
This commit is contained in:
Brian Paul
2002-07-09 01:22:50 +00:00
parent b4338e5887
commit 3b4fbbc129
33 changed files with 496 additions and 607 deletions

View File

@@ -512,8 +512,7 @@ static void clear (GLcontext *ctx, GLbitfield mask, GLboolean all,
/*
* Set the current reading buffer.
*/
static void set_read_buffer (GLcontext *ctx, GLframebuffer *buffer,
GLenum mode)
static void set_buffer (GLcontext *ctx, GLframebuffer *buffer, GLenum mode)
{
/*
DMesaContext c = (DMesaContext)ctx->DriverCtx;
@@ -523,18 +522,6 @@ static void set_read_buffer (GLcontext *ctx, GLframebuffer *buffer,
/*
* Set the destination/draw buffer.
*/
static void set_draw_buffer (GLcontext *ctx, GLenum mode)
{
/*
XXX this has to be fixed
*/
}
/*
* Return the width and height of the current buffer.
* If anything special has to been done when the buffer/window is
@@ -640,6 +627,7 @@ void dmesa_init_pointers (GLcontext *ctx)
ctx->Driver.CopyPixels = _swrast_CopyPixels;
ctx->Driver.DrawPixels = _swrast_DrawPixels;
ctx->Driver.ReadPixels = _swrast_ReadPixels;
ctx->Driver.DrawBuffer = _swrast_DrawBuffer;
/* Software texture functions:
*/
@@ -671,7 +659,6 @@ void dmesa_init_pointers (GLcontext *ctx)
/* Statechange callbacks:
*/
ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.ClearColor = clear_color;
/* Initialize the TNL driver interface:
@@ -699,7 +686,7 @@ static void dmesa_update_state (GLcontext *ctx, GLuint new_state)
_ac_InvalidateState(ctx, new_state);
_tnl_InvalidateState(ctx, new_state);
swdd->SetReadBuffer = set_read_buffer;
swdd->SetBuffer = set_buffer;
/* RGB(A) span/pixel functions */
swdd->WriteRGBASpan = write_rgba_span;