I just found and downloaded your tutorials yesterday. Though I have only just finished reading and working through chapter one, I wanted to provide a little feedback now rather than wait until I have finished everything.
First, THANK YOU VERY MUCH for undertaking this task. You have a made a tremendous start. I think MANY people will appreciate what you’re doing. I certainly do. I have been searching in vain for weeks trying to find anything that teaches “modern” (non-deprecated) OpenGL.
I believe I noticed one small error in your text. In Chapter One, Following the Data page, Vertex Transfer section, in your discussion of the code fragment for glBindBuffer(), glEnableVertexAttribArray(), and glVertexAttribPointer(), you wrote:
“This means that our data of 24 floats represents enough information for the 3 vertices of a single triangle; this is exactly what we want.”
I believe you should say that “… our data of 12 floats…” rather than 24 floats.
Here’s the feedback I have for you that I think is very significant, though. In your program code tut1.cpp, in function init(), you call glGenVertexArrays() and glBindVertexArrays(). However, I don’t believe you have discussed the significance of those two functions, what they do, or why they are where they are. Nor have they been included among the Chapter One, In Review page, OpenGL Functions of Note section.
Here’s why I think those two functions are so noteworthy. I am just starting to learn OpenGL, and want to learn proper techniques for core profile OpenGL 4.0. Before finding your tutorial, I have read parts of the OpenGL 4.0 core spec including section 2.10 (Vertex Array Objects), the entire book Beginning OpenGL Game Programming, second edition (2009), by Benstead, Astle, and Hawkins (which purports to teach “modern” (non-deprecated) OpenGL as in more-or-less core OpenGL 3.0), and the only other tutorial I have found that attempts to teach “modern” OpenGL.
The OpenGL 4.0 core spec doesn’t provide any useful information (at least that I can understand) as to Vertex Array Objects: are they required, and how, where, & why are they used?
Vertex Array Objects were not mentioned even once in the 290+ pages of the Benstead book. The only other “modern” OpenGL tutorial on the internet I have found also does not use Vertex Array Objects. I have spent two weeks trying to make the simplest OpenGL 4.0 core profile program display a single triangle without success. I have tried to write my own based on what I learned from the previously mentioned educational sources, I have tried to recreate the demo program from the other “modern” OpenGL tutorial I mentioned. None have worked.
Then, only after suffering extreme frustration and desperation, I found your tutorials. Your demo code uses a Vertex Array Object and it’s the first OpenGL 4.0 core profile program I have ever witnessed that actually works. I added a Vertex Array Object to my other programs, and now they also work. But I don’t really understand why. It isn’t clear to me how Vertex Array Objects connect or interact with other OpenGL objects. I don’t know whether or when I should use more than one VAO. All I know is, they are essential but not obvious.
I’m grateful your tutorial has finally set me on the correct path. Given that it seems other OpenGL experts don’t really seem to understand Vertex Array Objects, but that they are essential, it seems that VAOs really do deserve some discussion in chapter one of your tutorial.