summaryrefslogtreecommitdiff
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-05-04 13:53:55 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-05-04 13:53:55 +0000
commite70c623cf07f93a3e825116068d3108067988189 (patch)
treec27e4352b49cafa7bf464cd1e42fca04b47830c0 /src/mesa/main/buffers.c
parentad08108616b8ec0e64cc84ae2e93db44b33c1d5e (diff)
removed software alpha flag from GLvisual struct
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 834940129ca..086dc93451b 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,4 +1,3 @@
-/* $Id: buffers.c,v 1.7 2000/04/22 01:03:22 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -240,6 +239,9 @@ void
_mesa_Clear( GLbitfield mask )
{
GET_CURRENT_CONTEXT(ctx);
+#ifdef PROFILE
+ GLdouble t0 = gl_time();
+#endif
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glClear");
if (MESA_VERBOSE & VERBOSE_API)
@@ -295,10 +297,16 @@ _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]) {
_mesa_clear_alpha_buffers( ctx );
}
+
+#ifdef PROFILE
+ ctx->ClearTime += gl_time() - t0;
+ ctx->ClearCount++;
+#endif
}
}
@@ -420,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)
@@ -550,7 +558,7 @@ _mesa_ResizeBuffersMESA( void )
if (ctx->DrawBuffer->UseSoftwareAccumBuffer) {
_mesa_alloc_accum_buffer( ctx );
}
- if (ctx->Visual->SoftwareAlpha) {
+ if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
_mesa_alloc_alpha_buffers( ctx );
}
}