+
+const GLubyte *glGetStringi(GLenum name, GLuint index)
+{
+ char *key;
+ const struct cfgopt *option;
+
+ init();
+
+ switch(name) {
+ case GL_EXTENSIONS:
+ key = "extensions";
+ break;
+
+ case GL_SHADING_LANGUAGE_VERSION:
+ key = "sl version";
+ break;
+
+ default:
+ key = 0;
+ }
+
+ if(key && (option = gliar_find_opt(cfglist, key))) {
+ return (const GLubyte*)option->str_val[index];
+ }
+
+ return gl_get_stringi(name, index);
+}
+
+void glGetIntegerv(GLenum name, GLint *val)
+{
+ char *key;
+ const struct cfgopt *option;
+
+ init();
+
+ switch(name) {
+ case GL_NUM_EXTENSIONS:
+ if(1) {
+ key = "extensions";
+ } else {
+ case GL_NUM_SHADING_LANGUAGE_VERSIONS:
+ key = "sl version";
+ }
+ if(key && (option = gliar_find_opt(cfglist, key))) {
+ *val = option->str_count;
+ return;
+ }
+ break;
+
+ case GL_MAJOR_VERSION:
+ key = "major version";
+ break;
+
+ case GL_MINOR_VERSION:
+ key = "minor version";
+ break;
+
+ case GL_MAX_TEXTURE_UNITS:
+ key = "max texture units";
+ break;
+
+ case GL_MAX_TEXTURE_IMAGE_UNITS:
+ key = "max texture image units";
+ break;
+
+ case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
+ key = "max combined texture image units";
+ break;
+
+ case GL_MAX_TEXTURE_SIZE:
+ key = "max texture size";
+ break;
+
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
+ key = "max cube map texture size";
+ break;
+
+ case GL_MAX_TEXTURE_COORDS:
+ key = "max texture coordinates";
+ break;
+
+ case GL_MAX_VERTEX_ATTRIBS:
+ key = "max vertex attributes";
+ break;
+
+ case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS:
+ key = "max vertex texture image units";
+ break;
+
+ case GL_MAX_VERTEX_UNIFORM_VECTORS:
+ key = "max vertex uniform vectors";
+ break;
+
+ case GL_MAX_FRAGMENT_UNIFORM_VECTORS:
+ key = "max fragment uniform vectors";
+ break;
+
+ case GL_MAX_VARYING_VECTORS:
+ key = "max varying vectors";
+ break;
+
+ case GL_MAX_COLOR_ATTACHMENTS_EXT:
+ key = "max color attachments";
+ break;
+
+ case GL_MAX_RENDERBUFFER_SIZE_EXT:
+ key = "max renderbuffer size ext";
+ break;
+
+ default:
+ key = 0;
+ }
+
+ if(key && (option = gliar_find_opt(cfglist, key)) && option->type == GLIAR_NUMBER) {
+ *val = option->num_val;
+ return;
+ }
+
+ gl_get_integerv(name, val);
+}