fix GL_BACK color material bug
[mesa.git] / src / mesa / main / buffers.c
index cd40b52122413dbfc2b78606357333c6ed782ea2..086dc93451ba7e4d154784576ba8f00007c5d8f1 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: buffers.c,v 1.5 2000/04/11 21:26:57 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -298,9 +297,10 @@ _mesa_Clear( GLbitfield mask )
       }
 
       /* clear software-based alpha buffer(s) */
-      if ( (mask & GL_COLOR_BUFFER_BIT) && ctx->Visual->SoftwareAlpha
+      if ( (mask & GL_COLOR_BUFFER_BIT)
+           && ctx->DrawBuffer->UseSoftwareAlphaBuffers
            && ctx->Color.ColorMask[RCOMP]) {
-         gl_clear_alpha_buffers( ctx );
+         _mesa_clear_alpha_buffers( ctx );
       }
 
 #ifdef PROFILE
@@ -428,7 +428,7 @@ _mesa_DrawBuffer( GLenum mode )
    /*
     * Set current alpha buffer pointer
     */
-   if (ctx->Visual->SoftwareAlpha) {
+   if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
       if (ctx->Color.DriverDrawBuffer == GL_FRONT_LEFT)
          ctx->DrawBuffer->Alpha = ctx->DrawBuffer->FrontLeftAlpha;
       else if (ctx->Color.DriverDrawBuffer == GL_BACK_LEFT)
@@ -558,7 +558,7 @@ _mesa_ResizeBuffersMESA( void )
    if (ctx->DrawBuffer->UseSoftwareAccumBuffer) {
       _mesa_alloc_accum_buffer( ctx );
    }
-   if (ctx->Visual->SoftwareAlpha) {
-      gl_alloc_alpha_buffers( ctx );
+   if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
+      _mesa_alloc_alpha_buffers( ctx );
    }
 }