From: Brian Paul Date: Wed, 30 May 2001 14:43:17 +0000 (+0000) Subject: added test for EXT_fog_coord X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=529e48bb0fd53e3a47d01f42c0acfe7faa373912;p=mesa.git added test for EXT_fog_coord --- diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index a6ebb3e1101..dbb8269bd51 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -1,4 +1,4 @@ -/* $Id: fog.c,v 1.34 2001/03/12 00:48:37 gareth Exp $ */ +/* $Id: fog.c,v 1.35 2001/05/30 14:43:17 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -141,9 +141,10 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) ctx->Fog.Color[3] = params[3]; break; case GL_FOG_COORDINATE_SOURCE_EXT: { - GLenum p = (GLenum)(GLint) *params; - if (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT) { - _mesa_error( ctx, GL_INVALID_ENUM, "glFog" ); + GLenum p = (GLenum) (GLint) *params; + if (!ctx->Extensions.EXT_fog_coord || + (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glFog"); return; } if (ctx->Fog.FogCoordinateSource == p)