summaryrefslogtreecommitdiff
path: root/src/mesa/main/extensions.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-11-12 02:05:46 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-11-12 02:05:46 +0000
commita087e348ab534a8293c0dc1eb7fda8794326259d (patch)
tree6a458d2d2fe8356ddb3e6280b55a8c73f6cf1c8e /src/mesa/main/extensions.c
parentea895e68394f6a9970b226b589fb722acd3f090b (diff)
added gl_extension_is_enabled()
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 683fba79a0..c8b154d061 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;