diff options
author | Brian <[email protected]> | 2007-06-20 13:10:48 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-06-20 13:10:48 -0600 |
commit | b7c646d1bcf4b6fa285996d1b9b660ce478190f6 (patch) | |
tree | 76c122ce2ec8deab8574bd53c6db1742cbe30ae7 /src/mesa/drivers/x11 | |
parent | abf45c2a3db39fc1690e282e7f7603bc1d81f647 (diff) |
actually use new glClear code
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index eb59d1d05ef..57254148561 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -55,6 +55,8 @@ #include "pipe/softpipe/sp_context.h" #include "state_tracker/st_public.h" +#include "state_tracker/st_context.h" +#include "state_tracker/st_draw.h" /* @@ -393,6 +395,7 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers) /* we can't handle color or index masking */ if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) { +#if 0 if (buffers & BUFFER_BIT_FRONT_LEFT) { /* clear front color buffer */ struct gl_renderbuffer *frontRb @@ -416,6 +419,15 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers) buffers &= ~BUFFER_BIT_BACK_LEFT; } } +#else + /* Clear with state-tracker/pipe interface */ + struct st_context *st = st_context(ctx); + GLboolean color = (buffers & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) ? 1: 0; + GLboolean depth = (buffers & BUFFER_BIT_DEPTH) ? 1 : 0; + GLboolean stencil = (buffers & BUFFER_BIT_STENCIL) ? 1 : 0; + GLboolean accum = (buffers & BUFFER_BIT_ACCUM) ? 1 : 0; + st_clear(st, color, depth, stencil, accum); +#endif } } if (buffers) |