diff options
author | Brian Paul <[email protected]> | 2009-12-30 10:29:53 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-30 10:29:53 -0700 |
commit | 56bdaca03e2289f56d1c88668d0a0f1dbd5abeca (patch) | |
tree | f7ebca000a9516df0d8d6f8b49711192a32a4f1e /src/mesa/main/extensions.c | |
parent | 802b80893943cf129039a37fb2afe26444b09332 (diff) |
mesa: _mesa_get_enabled_extension() function
Diffstat (limited to 'src/mesa/main/extensions.c')
-rw-r--r-- | src/mesa/main/extensions.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 88c025ee326..7aec95f0480 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -725,3 +725,23 @@ _mesa_get_extension_count(GLcontext *ctx) return ctx->Extensions.Count; } + + +/** + * Return name of i-th enabled extension + */ +const GLubyte * +_mesa_get_enabled_extension(GLcontext *ctx, GLuint index) +{ + GLuint i; + + for (i = 0; i < Elements(default_extensions); i++) { + if (extension_enabled(ctx, i)) { + if (index == 0) + return (const GLubyte *) default_extensions[i].name; + index--; + } + } + + return NULL; +} |