-/* $Id: gl.h,v 1.20 1999/11/11 17:48:32 brianp Exp $ */
+/* $Id: gl.h,v 1.21 1999/11/12 02:08:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
+/*
+ * GL_EXT_texture_env_add
+ */
+#ifndef GL_EXT_texture_env_add
+#define GL_EXT_texture_env_add 1
+
+/* No new tokens or functions */
+
+#endif /* GL_EXT_texture_env_add */
+
+
#if defined(__BEOS__) || defined(__QUICKDRAW__)
-/* $Id: extensions.c,v 1.12 1999/11/12 02:05:46 brianp Exp $ */
+/* $Id: extensions.c,v 1.13 1999/11/12 02:07:56 brianp Exp $ */
/*
* Mesa 3-D graphics library
{ DEFAULT_ON, "GL_EXT_compiled_vertex_array" },
{ DEFAULT_OFF, "GL_EXT_vertex_array_set" },
{ DEFAULT_ON, "GL_EXT_clip_volume_hint" },
+ { DEFAULT_ON, "GL_EXT_texture_env_add" },
};
-/* $Id: texstate.c,v 1.5 1999/11/11 01:22:28 brianp Exp $ */
+/* $Id: texstate.c,v 1.6 1999/11/12 02:07:56 brianp Exp $ */
/*
* Mesa 3-D graphics library
#include "glheader.h"
#include "context.h"
#include "enums.h"
+#include "extensions.h"
#include "macros.h"
#include "matrix.h"
#include "texobj.h"
if (pname==GL_TEXTURE_ENV_MODE) {
GLenum mode = (GLenum) (GLint) *param;
switch (mode) {
- case GL_MODULATE:
- case GL_BLEND:
- case GL_DECAL:
- case GL_REPLACE:
+ case GL_ADD:
+ if (!gl_extension_is_enabled(ctx, "GL_EXT_texture_env_add")) {
+ gl_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)");
+ return;
+ }
+ /* FALL-THROUGH */
+ case GL_MODULATE:
+ case GL_BLEND:
+ case GL_DECAL:
+ case GL_REPLACE:
/* A small optimization for drivers */
if (texUnit->EnvMode == mode)
return;