mesa: _mesa_get_enabled_extension() function
This commit is contained in:
parent
802b808939
commit
56bdaca03e
|
@ -725,3 +725,23 @@ _mesa_get_extension_count(GLcontext *ctx)
|
||||||
|
|
||||||
return ctx->Extensions.Count;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -67,6 +67,9 @@ extern GLubyte *_mesa_make_extension_string(GLcontext *ctx);
|
||||||
extern GLuint
|
extern GLuint
|
||||||
_mesa_get_extension_count(GLcontext *ctx);
|
_mesa_get_extension_count(GLcontext *ctx);
|
||||||
|
|
||||||
|
extern const GLubyte *
|
||||||
|
_mesa_get_enabled_extension(GLcontext *ctx, GLuint index);
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue