voidgetGlslVersion(int*major,int*minor){intgl_major,gl_minor;getGlVersion(&gl_major,&gl_minor);*major=*minor=0;if(gl_major==1){// GL v1.x can only provide GLSL v1.00 as an extension
constchar*extstr=(constchar*)glGetString(GL_EXTENSIONS);if((extstr!=NULL)&&(strstr(extstr,"GL_ARB_shading_lanuage_100")!=NULL)){*major=1;*minor=0;}}elseif(gl_major>=2){// GL v2.0 and greater must parse the version string
constchar*verstr=(constchar*)glGetString(GL_SHADING_LANGUAGE_VERSION);if((verstr!=NULL)||(sscanf(verstr,"%d.%d",major,minor)!=2)){*major=*minor=0;fprintf(stderr,"Invalid GL_SHADING_LANGUAGE_VERSION format!!!n");}}}