diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-07-09 01:22:50 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-07-09 01:22:50 +0000 |
commit | 3b4fbbc129c711a5aec8d653d5c6eb2e195f947c (patch) | |
tree | ececa2d3a08ab45afd2068d9cabf5609a0c374d1 /src/mesa/drivers/osmesa | |
parent | b4338e58879a4f2eabf8af09f9dfa7adf6e9f9f2 (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/osmesa')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 20847f6286..8a80ab7597 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.85 2002/06/30 16:07:18 brianp Exp $ */ +/* $Id: osmesa.c,v 1.86 2002/07/09 01:22:51 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -721,14 +721,7 @@ do { \ -static void set_draw_buffer( GLcontext *ctx, GLenum mode ) -{ - (void) ctx; - (void) mode; -} - - -static void set_read_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) +static void set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) { /* separate read buffer not supported */ ASSERT(buffer == ctx->DrawBuffer); @@ -1887,7 +1880,6 @@ static void smooth_rgba_z_triangle( GLcontext *ctx, const SWvertex *v2 ) { const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - #define INTERP_Z 1 #define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE #define INTERP_RGB 1 @@ -1903,7 +1895,7 @@ static void smooth_rgba_z_triangle( GLcontext *ctx, FixedToChan(span->alpha)); \ zRow[i] = z; \ } \ - span->red += span->redStep; \ + span->red += span->redStep; \ span->green += span->greenStep; \ span->blue += span->blueStep; \ span->alpha += span->alphaStep; \ @@ -2080,7 +2072,6 @@ static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) ctx->Driver.GetString = get_string; ctx->Driver.UpdateState = osmesa_update_state; - ctx->Driver.SetDrawBuffer = set_draw_buffer; ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; ctx->Driver.GetBufferSize = buffer_size; @@ -2090,6 +2081,7 @@ static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) ctx->Driver.CopyPixels = _swrast_CopyPixels; ctx->Driver.DrawPixels = _swrast_DrawPixels; ctx->Driver.ReadPixels = _swrast_ReadPixels; + ctx->Driver.DrawBuffer = _swrast_DrawBuffer; ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; ctx->Driver.TexImage1D = _mesa_store_teximage1d; @@ -2114,6 +2106,8 @@ static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) ctx->Driver.CompressedTextureSize = _mesa_compressed_texture_size; ctx->Driver.GetCompressedTexImage = _mesa_get_compressed_teximage; + swdd->SetBuffer = set_buffer; + /* RGB(A) span/pixel functions */ if (osmesa->format == OSMESA_RGB) { swdd->WriteRGBASpan = write_rgba_span_RGB; @@ -2171,8 +2165,6 @@ static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) swdd->ReadCI32Span = read_index_span; swdd->ReadCI32Pixels = read_index_pixels; - swdd->SetReadBuffer = set_read_buffer; - tnl->Driver.RunPipeline = _tnl_run_pipeline; _swrast_InvalidateState( ctx, new_state ); |