Fix typo
[mesa.git] / src / mesa / swrast / s_alphabuf.c
index 11b782e787949f60457701b2d35f90d1383c0a15..5fbb6a36095085afa7446fa5b241b54444baf5b0 100644 (file)
@@ -1,9 +1,10 @@
+/* $Id: s_alphabuf.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
  * Version:  3.5
  * 
- * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2001  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"),
@@ -65,41 +66,41 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf )
    buf->FrontLeftAlpha = (GLchan *) MALLOC( bytes );
    if (!buf->FrontLeftAlpha) {
       /* out of memory */
-      gl_error( ctx, GL_OUT_OF_MEMORY,
+      _mesa_error( ctx, GL_OUT_OF_MEMORY,
                 "Couldn't allocate front-left alpha buffer" );
    }
 
-   if (ctx->Visual.DBflag) {
+   if (ctx->Visual.doubleBufferMode) {
       if (buf->BackLeftAlpha) {
          FREE( buf->BackLeftAlpha );
       }
       buf->BackLeftAlpha = (GLchan *) MALLOC( bytes );
       if (!buf->BackLeftAlpha) {
          /* out of memory */
-         gl_error( ctx, GL_OUT_OF_MEMORY,
+         _mesa_error( ctx, GL_OUT_OF_MEMORY,
                       "Couldn't allocate back-left alpha buffer" );
       }
    }
 
-   if (ctx->Visual.StereoFlag) {
+   if (ctx->Visual.stereoMode) {
       if (buf->FrontRightAlpha) {
          FREE( buf->FrontRightAlpha );
       }
       buf->FrontRightAlpha = (GLchan *) MALLOC( bytes );
       if (!buf->FrontRightAlpha) {
          /* out of memory */
-         gl_error( ctx, GL_OUT_OF_MEMORY,
+         _mesa_error( ctx, GL_OUT_OF_MEMORY,
                    "Couldn't allocate front-right alpha buffer" );
       }
 
-      if (ctx->Visual.DBflag) {
+      if (ctx->Visual.doubleBufferMode) {
          if (buf->BackRightAlpha) {
             FREE( buf->BackRightAlpha );
          }
          buf->BackRightAlpha = (GLchan *) MALLOC( bytes );
          if (!buf->BackRightAlpha) {
             /* out of memory */
-            gl_error( ctx, GL_OUT_OF_MEMORY,
+            _mesa_error( ctx, GL_OUT_OF_MEMORY,
                       "Couldn't allocate back-right alpha buffer" );
          }
       }
@@ -135,7 +136,7 @@ _mesa_alloc_alpha_buffers( GLcontext *ctx )
 void
 _mesa_clear_alpha_buffers( GLcontext *ctx )
 {
-   const GLchan aclear = (GLint) (ctx->Color.ClearColor[3] * CHAN_MAXF);
+   const GLchan aclear = ctx->Color.ClearColor[3];
    GLuint bufferBit;
 
    ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);