I don't use any IDE I use g++ under ubuntu 13.
The version of OpenGL is 2.1.
Thanks!
If you're seeing OpenGL 2.1 on Ubuntu 13.04 or 13.10 it's because you're looking at the Mesa drivers. Turns out they lie, they actually secretly support at least GLX+OpenGL 4.1 and EGL+OpenGL|ES 1.3. Of course, the runtime is provided by the DRI2 drivers for your hardware even if you compile against Mesa.
You might enjoy knowing that the Ubuntu Unity stack (the desktop shell) is built on those same Mesa bindings, using only OpenGL 2.1.4 with extensions (vertex and fragment shaders and VBOs and some texture extensions) or OpenGL|ES 2.1.4. That's the sweet spot for portability. Older than that, it won't work on mobile hardware and newer than that it won't work on netbooks and old machines.
For full portability, what you really want to do is use an extension wrangler, like Glew.