[OpenGL 3.2] How to get GLSL version with glGetStringi ?
I find annoying to extract version of GLSL with glGetString(GL_SHADING_LANGUAGE_VERSION_ARB);
So i dig more in the documentation, and found glGestStringi, which makes it easier to extract parts of strings.
I'd thought of doing something like this:
int major = atoi( (const char *) glGetStringi(GL_SHADING_LANGUAGE_VERSION_ARB, 0) );
int minor = atoi( (const char *) glGetStringi(GL_SHADING_LANGUAGE_VERSION_ARB, 1) );
But it doesn't work.
GlGetError returns invalid enumerant .
So, what could i use for indexing ? I'm sure i've missed a thing in the documentation, but couldn't find the place where the indexes are listed.