Only GL_EXTENSIONS is supported with glGetStringi (see glGetString). It is not meant to give you arbitrary parts of strings, but rather for those strings that contain many values (i.e. all supported extensions) to allow you to pick just one. You’ll have to do the parsing of the GLSL version by hand.
Only GL_EXTENSIONS is supported with glGetStringi (see glGetString).
Technically, that’s not true in GL 4.3. There was a (pure-core) addition that allows you to query GL_NUM_SHADING_LANGUAGE_VERSIONS (the number of supported versions) with glGetIntegerv, and then enumerate those versions with glGetStringi.
Ah, thanks for the info. I had only looked at the 3.x man pages and it seems the 4.x man page for glGetString is not updated with this information yet. Anyway, I guess you’d still get complete GLSL version numbers (like “4.3”) not individual major/minor numbers (like “4”, “3”) though, right?