For window libaries that support OpenGL there's
- glfw
- freeglut
- sdl
- gtk
Still on the fence about which one I want to use.


Originally I was thinking of using GTK, since it has the option of using other widgets along with the GtkGLArea to be able to make general applications with GTK and have the option of adding on graphics. Though that seems to bring up the KDE/Gnome flame war out of no where. Also it requires OpenGL 3.0 or higher as OpenGL 2.0 and lower has too much legacy code to work with. Makes sense, though I still don't know how to use VOA's effectively.

You probably shouldn't be using anything less than 3.3 anyways. I prefer glfw for both vulkan and opengl. It seams to have the most modern approach when compared to sdl, gtk, and freeglut.

@chmod777 SDL seems like the most complete option, but I like the callback style for keydown event handling compared to the polling that SDL uses.

@chmod777 Is there anyway to use OpenGL 3+ without VOA's?

Yes but VAOs really do make your life easier in the long run. If you are set on not using them...

Bind the buffer you are using
glBindBuffer(ARRAY_BUFFER, VBO);

And then for each attribute your buffer has
glVertexAttribPointer(location, ...);

set uniforms here

This website can explain it much better

since webgl 1.0 doesn't have VAOs you might look for a tutorial on webgl 1.0

@chmod777 It's not that I have my heart set on not using them as much as I find them confusing.

OpenGL 1.0 is an intuitive to use API where you set attributes and draw primitives to the screen.

In OpenGL 2.0 you can see how they made that more efficient by moving the vertices and texture data to the GPU and then offloading what the CPU was doing into OpenGL 1, to the GPU by defining shaders.

@chmod777 With OpenGL 3, what I can gather is that a VAO is group of buffered objects (maybe). It's a probably a lot of laziness on my part for not doing my due investigate what these are and how to implement them.

My complaint is that mostly for simple applications in OpenGL, they probably won't be complex enough to benefit from the functionality that VOA's offer in favor of using OpenGL at the functionality of OpenGL 2.x.

Yeah there is defiently a place for the simpler APIs but there is also a ceiling to what they can do with them.

@chmod777 So basically I'd be happier to have the option of being able to not use them in a OpenGL 3.0 context, until i had a better idea of what they are, how to implement them correctly and understand the concepts of why they're there.

As opposed to now, where it's like, "these VAO lines are here in the program because otherwise it won't run without them".

But I guess I should do the due diligence thing and try to figure out at least what they are and why they're (probably) helpful.

Basically a Vertex Buffer Object(VBO) is a buffer containing all the data that is stored on a per vertex basis. (position, and maybe, normal, color, ...). The GPU doesn't know how to access the attributes(position, normal, color, etc) of that buffer so the we tell it how to do so by using attribute pointers. This can be comberson because there can be lots of attribute pointers and they would have different locations in different shader programs.

In comes the vertex array buffer.

sorry vertex array object. the VAO simplifies the process of letting the shader know how to enable the attribute pointers because you just bind the VAO with one gl call instead of the many gl calls you would make to resetup the attribute pointers.

@chmod777 it will probably take my stupid brain a little bit of time to comprehend that. But basically similar to the way OpenGL 2 improves over OpenGL 1 by moving buffers to the GPU, OpenGL 3 improves on OpenGL 2 by introducing batch draw calls by using VAO's (i think).

Sign in to participate in the conversation

Linux Geeks doing what Linux Geeks do..