How to specify OpenGL version in X window?
问题 My question is how to specify OpenGL version in X window system and in addition remove those deprecated functions. My GL version is 4.3. I know how to do that using SDL or glut. 回答1: First you must know how to create a OpenGL context using bare X11 / Xlib first. Have a look at this code https://github.com/datenwolf/codesamples/blob/master/samples/OpenGL/x11argb_opengl/x11argb_opengl.c To make this actually select a modern version profile this code block is used #if USE_GLX_CREATE_CONTEXT