diff options
author | Brian Paul <[email protected]> | 2006-03-28 15:21:44 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-03-28 15:21:44 +0000 |
commit | c7a5d528c7e5f4812b423bf4c091d21c34af3cf1 (patch) | |
tree | 0cfaeee8d45666c644ad22f4a7b164e0de83d056 /src/mesa/drivers/x11/xm_line.c | |
parent | b8915340eab706776244e04547f64444f0ff2f8b (diff) |
a little code movement so we don't make invalid casts from gl_renderbuffers to xmesa_renderbuffers
Diffstat (limited to 'src/mesa/drivers/x11/xm_line.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_line.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index 1c50de3dc9c..f60ffa65eb9 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -69,7 +69,7 @@ static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert ) color[2], color[3], xmesa->pixelformat); XMesaSetForeground( dpy, gc, pixel ); - x = (GLint) vert->win[0]; + x = (GLint) vert->win[0]; y = YFLIP( xrb, (GLint) vert->win[1] ); XMesaDrawPoint( dpy, buffer, gc, x, y); } @@ -577,7 +577,7 @@ get_line_func(GLcontext *ctx) XMesaContext xmesa = XMESA_CONTEXT(ctx); SWcontext *swrast = SWRAST_CONTEXT(ctx); int depth = GET_VISUAL_DEPTH(xmesa->xm_visual); - GET_XRB(xrb); + struct xmesa_renderbuffer *xrb; if ((ctx->DrawBuffer->_ColorDrawBufferMask[0] & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) == 0) @@ -589,6 +589,9 @@ get_line_func(GLcontext *ctx) if (ctx->Line.StippleFlag) return (swrast_line_func) NULL; if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_line_func) NULL; + xrb = (struct xmesa_renderbuffer *) + ctx->DrawBuffer->_ColorDrawBuffers[0][0]->Wrapped; + if (xrb->ximage && swrast->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS |