summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/blend.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-08-30 18:21:06 +0000
committerBrian Paul <[email protected]>2000-08-30 18:21:06 +0000
commit8e053916c8052b47c191f68991c126f47c72c3f3 (patch)
tree56ce72c5a4958145c18030cabe7d10c9f1cb8b98 /src/mesa/main/blend.c
parent289d47eee5342bd7ec1c25a29d9bdc8d6f9dc4ed (diff)
added more extensions testing code
Diffstat (limited to 'src/mesa/main/blend.c')
-rw-r--r--src/mesa/main/blend.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 5924585f3f3..431fa603d27 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -1,4 +1,4 @@
-/* $Id: blend.c,v 1.16 2000/06/29 22:06:22 brianp Exp $ */
+/* $Id: blend.c,v 1.17 2000/08/30 18:21:06 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -266,11 +266,26 @@ _mesa_BlendEquation( GLenum mode )
switch (mode) {
case GL_MIN_EXT:
case GL_MAX_EXT:
- case GL_LOGIC_OP:
case GL_FUNC_ADD_EXT:
+ if (ctx->Extensions.HaveBlendMinmax) {
+ ctx->Color.BlendEquation = mode;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
+ return;
+ }
+ case GL_LOGIC_OP:
+ ctx->Color.BlendEquation = mode;
+ break;
case GL_FUNC_SUBTRACT_EXT:
case GL_FUNC_REVERSE_SUBTRACT_EXT:
- ctx->Color.BlendEquation = mode;
+ if (ctx->Extensions.HaveBlendSubtract) {
+ ctx->Color.BlendEquation = mode;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
+ return;
+ }
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glBlendEquation" );