diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/allegro/amesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/d3d/NullProcs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/ggi/ggimesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/glide/fxddspan.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/windows/wmesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 11 |
7 files changed, 23 insertions, 22 deletions
diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c index 41dfcb18f08..0728c342733 100644 --- a/src/mesa/drivers/allegro/amesa.c +++ b/src/mesa/drivers/allegro/amesa.c @@ -112,15 +112,15 @@ IMPLEMENT_READ_RGBA_PIXELS(32, unsigned long) /***** Miscellaneous device driver funcs *****/
/**********************************************************************/
-static GLboolean set_buffer(GLcontext *ctx, GLenum mode)
+static GLboolean set_buffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bit)
{
AMesaContext context = (AMesaContext)(ctx->DriverCtx);
GLboolean ok = GL_TRUE;
- if (mode == GL_FRONT_LEFT)
+ if (bit == FRONT_LEFT_BIT)
context->Buffer->Active = context->Buffer->Screen;
- else if (mode == GL_BACK_LEFT)
+ else if (bit == BACK_LEFT)
{
if (context->Buffer->Background)
context->Buffer->Active = context->Buffer->Background;
diff --git a/src/mesa/drivers/d3d/NullProcs.c b/src/mesa/drivers/d3d/NullProcs.c index 58be86c2318..d6fb598074b 100644 --- a/src/mesa/drivers/d3d/NullProcs.c +++ b/src/mesa/drivers/d3d/NullProcs.c @@ -28,7 +28,7 @@ /*===========================================================================*/ void NULLSetColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); void NULLClearColor( GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a ); -GLboolean NULLSetBuffer( GLcontext *ctx, GLenum mode ); +GLboolean NULLSetBuffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bit ); void NULLGetBufferSize( GLcontext *ctx, GLuint *width, GLuint *height ); GLbitfield NULLClearBuffers( GLcontext *ctx, GLbitfield m, GLboolean a, GLint x, GLint y, GLint w, GLint h ); void NULLWrSpRGB( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte r[][3], const GLubyte m[] ); diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c index 94364f49e45..b3afe6ef6c0 100644 --- a/src/mesa/drivers/ggi/ggimesa.c +++ b/src/mesa/drivers/ggi/ggimesa.c @@ -151,14 +151,14 @@ static void gl_ggiClear(GLcontext *ctx, GLbitfield mask, GLboolean all, /* Set the buffer used for reading */ /* XXX support for separate read/draw buffers hasn't been tested */ -static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLenum mode) +static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit) { ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx; printf("set read %d\n", mode); GGIMESADPRINT_CORE("gl_ggiSetBuffer() called\n"); - if (mode == GL_FRONT_LEFT) + if (bufferBit == FRONT_LEFT_BIT) { ggiSetReadFrame(ggi_ctx->ggi_visual, ggiGetDisplayFrame(ggi_ctx->ggi_visual)); @@ -166,7 +166,7 @@ static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLframebuffer *buffer, GLenum m ggiGetDisplayFrame(ggi_ctx->ggi_visual)); return GL_TRUE; } - else if (mode == GL_BACK_LEFT) + else if (bufferBit == BACK_LEFT_BIT) { ggiSetReadFrame(ggi_ctx->ggi_visual, ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1); diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c index 98aabc5c0d1..f9108cfd19e 100644 --- a/src/mesa/drivers/glide/fxddspan.c +++ b/src/mesa/drivers/glide/fxddspan.c @@ -1,4 +1,4 @@ -/* $Id: fxddspan.c,v 1.20 2002/07/09 01:22:51 brianp Exp $ */ +/* $Id: fxddspan.c,v 1.21 2002/10/11 17:41:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -536,7 +536,7 @@ fxDDReadDepthPixels(GLcontext * ctx, GLuint n, /* Set the buffer used for reading */ /* XXX support for separate read/draw buffers hasn't been tested */ static void -fxDDSetBuffer(GLcontext * ctx, GLframebuffer * buffer, GLenum mode) +fxDDSetBuffer(GLcontext * ctx, GLframebuffer * buffer, GLuint bufferBit) { fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; (void) buffer; @@ -545,11 +545,11 @@ fxDDSetBuffer(GLcontext * ctx, GLframebuffer * buffer, GLenum mode) fprintf(stderr, "fxmesa: fxDDSetBuffer(%x)\n", (int) mode); } - if (mode == GL_FRONT_LEFT) { + if (bufferBit == FRONT_LEFT_BIT) { fxMesa->currentFB = GR_BUFFER_FRONTBUFFER; FX_grRenderBuffer(fxMesa->currentFB); } - else if (mode == GL_BACK_LEFT) { + else if (bufferBit == BACK_LEFT_BIT) { fxMesa->currentFB = GR_BUFFER_BACKBUFFER; FX_grRenderBuffer(fxMesa->currentFB); } diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index e6f9ebc3d83..5c1f7691c93 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.89 2002/10/05 03:02:01 brianp Exp $ */ +/* $Id: osmesa.c,v 1.90 2002/10/11 17:41:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -721,11 +721,11 @@ do { \ -static void set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) +static void set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) { /* separate read buffer not supported */ ASSERT(buffer == ctx->DrawBuffer); - ASSERT(mode == GL_FRONT_LEFT); + ASSERT(bufferBit == FRONT_LEFT_BIT); } diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c index 8d59cff2039..bd91040221b 100644 --- a/src/mesa/drivers/windows/wmesa.c +++ b/src/mesa/drivers/windows/wmesa.c @@ -1,4 +1,4 @@ -/* $Id: wmesa.c,v 1.38 2002/10/04 19:10:11 brianp Exp $ */ +/* $Id: wmesa.c,v 1.39 2002/10/11 17:41:05 brianp Exp $ */ /* * Windows (Win32) device driver for Mesa 3.4 @@ -582,9 +582,9 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable ) static void set_buffer(GLcontext *ctx, GLframebuffer *colorBuffer, - GLenum buffer ) + GLuint bufferBit ) { - /* XXX todo - examine buffer and set read/write pointers */ + /* XXX todo - examine bufferBit and set read/write pointers */ return; } diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 9be4aba69be..81a4b006a46 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.37 2002/10/04 19:10:12 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.38 2002/10/11 17:41:06 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ flush( GLcontext *ctx ) * lines, and triangles. */ static void -set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) +set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit ) { /* We can make this cast since the XMesaBuffer wraps GLframebuffer. * GLframebuffer is the first member in a XMesaBuffer struct. @@ -139,10 +139,10 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) /* * Now determine front vs back color buffer. */ - if (mode == GL_FRONT_LEFT) { + if (bufferBit == FRONT_LEFT_BIT) { target->buffer = target->frontbuffer; } - else if (mode == GL_BACK_LEFT) { + else if (bufferBit == BACK_LEFT_BIT) { ASSERT(target->db_state); if (target->backpixmap) { /* back buffer is a pixmape */ @@ -158,7 +158,8 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode ) } } else { - _mesa_problem(ctx, "invalid buffer in set_buffer() in xmesa2.c"); + _mesa_problem(ctx, "invalid buffer in set_buffer() in xm_dd.c"); + printf("bufferBit = 0x%x\n", bufferBit); return; } xmesa_update_span_funcs(ctx); |