Version selection in code for OpenGL