summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/extensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/extensions.c')
-rw-r--r--src/mesa/main/extensions.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 683fba79a0f..c8b154d0613 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,4 +1,4 @@
-/* $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
@@ -133,6 +133,24 @@ int gl_extensions_disable( GLcontext *ctx, const char *name )
}
+/*
+ * 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;