-/* $Id: extensions.c,v 1.11 1999/11/11 01:22:26 brianp Exp $ */
+/* $Id: extensions.c,v 1.12 1999/11/12 02:05:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
+/*
+ * Test if the named extension is enabled in this context.
+ */
+GLboolean gl_extension_is_enabled( GLcontext *ctx, const char *name)
+{
+ struct extension *i;
+ foreach( i, ctx->Extensions.ext_list )
+ if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0) {
+ if (i->enabled)
+ return GL_TRUE;
+ else
+ return GL_FALSE;
+ }
+
+ return GL_FALSE;
+}
+
+
void gl_extensions_dtr( GLcontext *ctx )
{
struct extension *i, *nexti;
-/* $Id: extensions.h,v 1.5 1999/10/16 11:30:27 brianp Exp $ */
+/* $Id: extensions.h,v 1.6 1999/11/12 02:05:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
extern int gl_extensions_enable( struct gl_context *ctx, const char *name );
extern int gl_extensions_disable( struct gl_context *ctx, const char *name );
+extern GLboolean gl_extension_is_enabled( GLcontext *ctx, const char *name);
extern void gl_extensions_dtr( struct gl_context *ctx );
extern void gl_extensions_ctr( struct gl_context *ctx );
extern const char *gl_extensions_get_string( struct gl_context *ctx );