Linux OpenGL programming, should I use GLX or any other

clinuxopengl

I'm new to OpenGL and found that there are a lot of libraries to do that in C,
and I also found that glx is most friendly with Linux X Server, I just want to do basic stuff, and I cannot find any tutorials for GLX.

Is GLX a bad thing? I just want to do some small graphical things without installing many libraries and getting confused. Can anyone suggest me something which has tutorials and simple to compile?

I found a link with an example with GLX and it worked perfect with no errors: anyone please suggest where I can find nice documentation or any better libraries.

Best Answer

GLX library is written to communicate OpenGL application with the X server. It probably doesn't do anything more than that, but it's enough for you. When you create and set up your window and GL context with GLX, you start using OpenGL like everywhere else. In other hand do you really want to set up everything yourself using so low-level libraries only to draw a 3D sphere? IMO it overkill. Won't it be better for you to use a wrapper framework, like i.e. GLFW? It'll do for you everything you'll want to without need of writing a lot of redundant C-code.

And if you are using Linux, installing additional libraries (or any other package) sure won't be a problem. Every distro is using package manager, which makes installing almost anything very easy.

Related Topic