I'm trying to use OpenGL on Linux with the Mesa libraries but I'm confused as to what header/library combination I should actually be using.
The GL/gl.h
file does not include any of the OpenGL 3.0+ functions, like glCreateProgram
. These are however in the GL/glext.h
file but only if GL_GLEXT_PROTOTYPES
is defined. This would be linked against the GL
library.
The GLES2/gl2.h
includes all the definitions I need, and also has a different library GLESv2
.
What is the correct combination of headers and libraries for a Linux desktop?
I can also add to this list should I be using GLUT, GLEW, or GLEX or EGL? All of these are all part of MESA and the samples seem to choose at random.