I work on Ubuntu 18.04. I don't define GL_GLEXT_PROTOTYPES. I load "core" OpenGL functions using glXGetProcAddress. My application links to /usr/lib/x86_64-linux-gnu/libGL.so. Some legacy OpenGL functions are available without defining GL_GLEXT_PROTOTYPES or calling glXGetProcAddress, for example glColor3f. Which OpenGL version (functions) is available by default under Linux ?
Edit
I assume that the hardware supports the newest OpenGL version. Moreover I use compatibility profile and OpenGL headers (gl.h, glext.h) from the standard Ubuntu location: /usr/include/GL. It looks like that those headers have been installed by mesa-common-dev apt package.
Traditionally, the
libGL.soon Linux is provided by the vendor of your graphics driver. There is no real "default" version. The closes thing to a standard you can find in that regard is the OpenGL® Application Binary Interface for Linux which states:and
So that is basically the set of directly exported GL functions you can rely on. Typically, the GL libs of various vendors export much more, but the official way yo query things is the extension mechanism.
Note that on Linux, the modern way to use OpenGL is by the vendor-neutral GL dispatch library which provides
libOpenGL.soinstead oflibGL.so. It seems to export all core OpenGL functions known at the time it was built. But that doesn't mean that the particular vendor implementation will support all these functions.