Will my opengl 2.1 code work on computers with openg l> 3?

Hi, i’m new to opengl and i decided that i will start with opengl 2.1(yes, i know it’s deprecated) because of compatibility with old hardware(and because it’s easier :smiley: ). However, I don’t know if my opengl 2.1 program will work with new video cards, I heard that for newer versions of opengl there’s the compatibility profile but I don’t know if it available in mesa’s implementation of opengl(I’m a linux developer).
So the question is: Will my opengl 2.1 code work on computers with opengl > 3.x? Will it also work on mesa’s implementation(see quote below)?

Quote from mesa3d’s website: “Mesa 10.4.5 implements the OpenGL 3.3 API, but the version reported by glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. Some drivers don’t support all the features required in OpenGL 3.3. OpenGL 3.3 is only available if requested at context creation because compatibility contexts are not supported.

Of course it will. Just think about it, old applications have to run on newer hardware as well. So if you write a new application using old techniques it will run on new hardware just as well as old application that use these same old techniques do.


It’s not easier. 2.1 was released 2006, so just don’t waste your time with learning a decade old standard.
Just my opinion, but learn the latest possible version your circumstances offers.