From be3d539dac3948458931be63fa3e97e072871550 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Mar 2001 00:21:32 +0000 Subject: added Driver.BlendColor() function, for completeness --- src/mesa/main/blend.c | 9 ++++++--- src/mesa/main/dd.h | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 7aaf31e872..342d0a48d9 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -1,4 +1,4 @@ -/* $Id: blend.c,v 1.29 2001/03/03 20:33:27 brianp Exp $ */ +/* $Id: blend.c,v 1.30 2001/03/07 00:21:32 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -302,7 +302,7 @@ _mesa_BlendEquation( GLenum mode ) if (ctx->Color.BlendEquation == mode) return; - + FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.BlendEquation = mode; @@ -313,7 +313,7 @@ _mesa_BlendEquation( GLenum mode ) ctx->Color.BlendEnabled); if (ctx->Driver.BlendEquation) - ctx->Driver.BlendEquation( ctx, mode ); + (*ctx->Driver.BlendEquation)( ctx, mode ); } @@ -335,5 +335,8 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) FLUSH_VERTICES(ctx, _NEW_COLOR); COPY_4FV( ctx->Color.BlendColor, tmp ); + + if (ctx->Driver.BlendColor) + (*ctx->Driver.BlendColor)(ctx, tmp); } diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index d55158fba4..35f122415f 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -1,4 +1,4 @@ -/* $Id: dd.h,v 1.55 2001/03/03 00:12:47 brianp Exp $ */ +/* $Id: dd.h,v 1.56 2001/03/07 00:21:32 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -718,6 +718,7 @@ struct dd_function_table { *** May add more functions like these to the device driver in the future. ***/ void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLchan ref); + void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); void (*BlendEquation)(GLcontext *ctx, GLenum mode); void (*BlendFunc)(GLcontext *ctx, GLenum sfactor, GLenum dfactor); void (*BlendFuncSeparate)(GLcontext *ctx, -- cgit v1.2.3