the edition of opengl?

Hello! I want to know how could i know the edition of my opengl(1.1or1.2?) and if it is 1.1,how to use opengl 1.2?
thank you !

glGetString(GL_VERSION) returns the version number string.
Format is <major>.<minor><.|SPACE><vendorspecific>

With OpenGL 2.0 available, make sure you parse major > 1 correctly, too.

If your OpenGL implementation does not offer your required version number and also doesn’t advertise the features you require as extensions (e.g multitexture is core in 1.2, but extension in 1.1) you’re out of luck and need a newer hardware or a different algorithm to render your desired image.