summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/windows
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-07-09 01:22:50 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-07-09 01:22:50 +0000
commit3b4fbbc129c711a5aec8d653d5c6eb2e195f947c (patch)
treeececa2d3a08ab45afd2068d9cabf5609a0c374d1 /src/mesa/drivers/windows
parentb4338e58879a4f2eabf8af09f9dfa7adf6e9f9f2 (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/windows')
-rw-r--r--src/mesa/drivers/windows/wmesa.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c
index 09fa23737f..35a670096a 100644
--- a/src/mesa/drivers/windows/wmesa.c
+++ b/src/mesa/drivers/windows/wmesa.c
@@ -1,4 +1,4 @@
-/* $Id: wmesa.c,v 1.31 2002/06/15 03:03:10 brianp Exp $ */
+/* $Id: wmesa.c,v 1.32 2002/07/09 01:22:51 brianp Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
@@ -569,20 +569,12 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
}
}
-static void set_draw_buffer( GLcontext* ctx, GLenum mode )
-{
- /* XXX doing nothing for now */
- /* if front buffer, fine */
- /* if back buffer, fine */
- /* else, check swrast->_RasterMask & MULTI_DRAW_BIT, if true, */
- /* use a swrast fallback function */
-}
-static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
- GLenum buffer )
+static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
+ GLenum buffer )
{
- /* XXX todo */
+ /* XXX todo - examine buffer and set read/write pointers */
return;
}
@@ -1027,7 +1019,6 @@ static void SetFunctionPointers(GLcontext *ctx)
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
ctx->Driver.GetString = get_string;
ctx->Driver.UpdateState = wmesa_update_state;
- ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
ctx->Driver.GetBufferSize = buffer_size;
@@ -1043,6 +1034,7 @@ static void SetFunctionPointers(GLcontext *ctx)
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;
@@ -1068,7 +1060,7 @@ static void SetFunctionPointers(GLcontext *ctx)
ctx->Driver.GetCompressedTexImage = _mesa_get_compressed_teximage;
- swdd->SetReadBuffer = set_read_buffer;
+ swdd->SetBuffer = set_buffer;
/* Pixel/span writing functions: */
@@ -1106,7 +1098,6 @@ static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
#if 0
ctx->Driver.GetString = get_string;
ctx->Driver.UpdateState = wmesa_update_state;
- ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
ctx->Driver.GetBufferSize = buffer_size;
@@ -1145,10 +1136,8 @@ static void wmesa_update_state( GLcontext *ctx, GLuint new_state )
ctx->Driver.BaseCompressedTexFormat = _mesa_base_compressed_texformat;
ctx->Driver.CompressedTextureSize = _mesa_compressed_texture_size;
ctx->Driver.GetCompressedTexImage = _mesa_get_compressed_teximage;
-
-
- swdd->SetReadBuffer = set_read_buffer;
-
+
+ swdd->SetBuffer = set_buffer;
/* Pixel/span writing functions: */
swdd->WriteRGBASpan = write_rgba_span;