summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/ggi
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-07-09 01:22:50 +0000
committerBrian Paul <[email protected]>2002-07-09 01:22:50 +0000
commit3b4fbbc129c711a5aec8d653d5c6eb2e195f947c (patch)
treeececa2d3a08ab45afd2068d9cabf5609a0c374d1 /src/mesa/drivers/ggi
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/ggi')
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c
index 97ab159558a..86de850e915 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -143,50 +143,30 @@ static void gl_ggiClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
}
-/* Set the buffer used for drawing */
-static void gl_ggiSetDrawBuffer(GLcontext *ctx, GLenum mode)
-{
- ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
-
- printf("set draw %d\n", mode);
- GGIMESADPRINT_CORE("gl_ggiSetDrawBuffer() called\n");
-
- if (mode == GL_FRONT_LEFT)
- {
- ggiSetWriteFrame(ggi_ctx->ggi_visual,
- ggiGetDisplayFrame(ggi_ctx->ggi_visual));
- }
- else if (mode == GL_BACK_LEFT)
- {
- ggiSetWriteFrame(ggi_ctx->ggi_visual,
- ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1);
- }
- else
- {
- /* nothing since we don't have any point/line/triangle functions. */
- }
-}
-
/* Set the buffer used for reading */
/* XXX support for separate read/draw buffers hasn't been tested */
-static GLboolean gl_ggiSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer, GLenum mode)
+static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLenum mode)
{
ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
printf("set read %d\n", mode);
- GGIMESADPRINT_CORE("gl_ggiSetReadBuffer() called\n");
+ GGIMESADPRINT_CORE("gl_ggiSetBuffer() called\n");
if (mode == GL_FRONT_LEFT)
{
ggiSetReadFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual));
+ ggiSetWriteFrame(ggi_ctx->ggi_visual,
+ ggiGetDisplayFrame(ggi_ctx->ggi_visual));
return GL_TRUE;
}
else if (mode == GL_BACK_LEFT)
{
ggiSetReadFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1);
+ ggiSetWriteFrame(ggi_ctx->ggi_visual,
+ ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1);
return GL_TRUE;
}
else
@@ -249,6 +229,7 @@ static void gl_ggiSetupPointers(GLcontext *ctx)
ctx->Driver.CopyPixels = _swrast_CopyPixels;
ctx->Driver.DrawPixels = _swrast_DrawPixels;
ctx->Driver.ReadPixels = _swrast_ReadPixels;
+ ctx->Driver.DrawBuffer = _swrast_DrawBuffer;
/* Software texturing */
ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format;
@@ -277,7 +258,6 @@ static void gl_ggiSetupPointers(GLcontext *ctx)
ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
/* State change callbacks */
- ctx->Driver.SetDrawBuffer = gl_ggiSetDrawBuffer;
ctx->Driver.ClearIndex = gl_ggiSetClearIndex;
ctx->Driver.ClearColor = gl_ggiSetClearColor;
ctx->Driver.IndexMask = gl_ggiIndexMask;