Please help me to clear up my confusion about OpenGL.

Hi folks,

I tried to get into OpenGL a couple of times now. Everything was clear while I was working in immediate mode. Well I also did understand how vbo’s and voa’s work. The problem is I find most of the tutorials on the web incoherent. For example a lot of them use functionality which they describe as deprecated. Plus it seems that every tutorial is using different libraries. There are:

[li] GLUT[/li][li] FreeGlut[/li][li] GLU[/li][li] GLFW[/li][/ul]
So I am pretty confused. My goals are:
[li] Rendering in retained mode[/li][li] loading and using shaders[/li][li] loading + displaying meshes created with Blender (or something similar).[/li][/ol]
Maybe at some point I want to process some user input but this is not my main goal. So I generally have two questions:
[li] What are the libraries I need to achive goals 1 + 2? And can someone point me to a tutorial where loading and using shaders is explained well. Please no NeHe, I am getting confused by those tutorials.[/li][li] What about Vulkan? Is it worth learning OpenGL right now? When is Vulkan coming out? Will it differ much from OpenGL? I read that it will be even more low level than OpenGL? Or would it be smarter to wait for it instead of deep diving into OpenGL right now?[/li][/ol]
I would love to learn graphics programming but I do not want it to be DirectX, so I would be very thankful if you give me some advice.


P.S.: If I get it right OpenGL applications can be implemented in both C and C++, what should be my choice here? I have a feeling that most of the tutorials are in C++? What are the pros and cons here?

You don’t actually need any of those libraries, although a toolkit such as GLUT (original or FreeGLUT or OpenGLUT) or GLFW or SDL will make it easier, particularly if you want to write cross-platform code.

You don’t need GLU for anything. Much of its functionality doesn’t even work in conjunction with shaders or when using a core profile (which is necessary for OpenGL 3 on Macs).

However, for modern OpenGL, you may want to use GLM for handling matrices.

OpenGL is a C API, as are most of the libraries (except GLM, which is C++).

When learning, it’s probably better to stick to C (or at least C-like code), as this makes it easier to post snippets of code which other people can understand.

So of the above mentioned which one would you pick? Which one is most suitable for beginners?

Btw, I also would rather stick to C but like I said, all the tutorials seem to be written in C++ :frowning:

Personally, I use GLUT for experimental code, SDL (or a full GUI toolkit such as GTK, Qt or wxWidgets) for anything which might have actual requirements. GLUT is the simplest but somewhat limited.