I’m just trying to make it easier for people learning OpenGL, especially students that dont have much programming experience.
To be honest, if someone wants to learn OpenGL, he should get a bit programming experience first. If someone has not enough experience to be able to call strstr a few times on the extension string, trying to write an OpenGL program is propably way over his head.
And there are always extension loading libraries…
String handling is not a trivial issue when you design an API for many different languages. The simpler datastructure returned, the less problems you will have with different languages.
A single space-separated string is probably the simplest structure, and will likely be the least problem for any language. An array of pointers to strings is a more complex structure and really gains you nothing other than easy loading in languages where such a structure actually make sense in native code.
In the vertex program extension document, for example, there’s even an explicit issue (number 45) asking whether the program string should be null terminated or not. While strings in C are null terminated, they decided to not use null-terminated strings due to language reasons. Shows that the string issue is not as trivial as this thread and it’s suggestions thinks sometimes.
A function like this would not be any worse from a language point of view than the current approach:
GLubyte *glEnumExtension(GLuint index);
Thre is always the OpenAL way of doing it;
GLBoolean lpIsExtensionPresent(const char* extname);
There are also GLEW and GLEE, which are very fast and handle checking for extensions and the GL version, as well as loading the entry points.