diff options
author | Brian Paul <[email protected]> | 2003-05-27 15:20:43 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-05-27 15:20:43 +0000 |
commit | 8750668ad71d45d97a0b07a2c23e68322aac4b10 (patch) | |
tree | b5219213e63f1b4e2982feb76a291020d1f70a4a /src/mesa | |
parent | a3793214e941607b31faac33e73a23387ed2163e (diff) |
check buffer->UseSoftware*Buffer in _mesa_free_framebuffer_data()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/context.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index aaba851165d..1101045afd3 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -507,33 +507,35 @@ _mesa_free_framebuffer_data( GLframebuffer *buffer ) if (!buffer) return; - if (buffer->DepthBuffer) { + if (buffer->UseSoftwareDepthBuffer && buffer->DepthBuffer) { MESA_PBUFFER_FREE( buffer->DepthBuffer ); buffer->DepthBuffer = NULL; } - if (buffer->Accum) { + if (buffer->UseSoftwareAccumBuffer && buffer->Accum) { MESA_PBUFFER_FREE( buffer->Accum ); buffer->Accum = NULL; } - if (buffer->Stencil) { + if (buffer->UseSoftwareStencilBuffer && buffer->Stencil) { MESA_PBUFFER_FREE( buffer->Stencil ); buffer->Stencil = NULL; } - if (buffer->FrontLeftAlpha) { - MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); - buffer->FrontLeftAlpha = NULL; - } - if (buffer->BackLeftAlpha) { - MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); - buffer->BackLeftAlpha = NULL; - } - if (buffer->FrontRightAlpha) { - MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); - buffer->FrontRightAlpha = NULL; - } - if (buffer->BackRightAlpha) { - MESA_PBUFFER_FREE( buffer->BackRightAlpha ); - buffer->BackRightAlpha = NULL; + if (buffer->UseSoftwareAlphaBuffers){ + if (buffer->FrontLeftAlpha) { + MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); + buffer->FrontLeftAlpha = NULL; + } + if (buffer->BackLeftAlpha) { + MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); + buffer->BackLeftAlpha = NULL; + } + if (buffer->FrontRightAlpha) { + MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); + buffer->FrontRightAlpha = NULL; + } + if (buffer->BackRightAlpha) { + MESA_PBUFFER_FREE( buffer->BackRightAlpha ); + buffer->BackRightAlpha = NULL; + } } } |