I’ve got two good resources for starting OpenGL both using the C++ language:
[i]LearnOpenGL - i]
OpenGL Programming Guide 9th Edition
The former starts teaching by OpenGL ver 3.3 and the latter by 4.5 while both call themselves teaching “modern OpenGL”!!
At the time being I’m reading both. But I wanted to ask you that while there is distance between 3.3 and 4.5 first which one is correct to be called modern? And which one is better for starting as a beginner?
The term “Modern OpenGL” typically refers to the use of core profile OpenGL stuff, as opposed to compatibility GL features. That is, shaders, buffer objects for vertex arrays, FBOs, etc.
Personally though, I don’t much like this nomenclature, since it suggests that unqualified “OpenGL” should be assumed to include compatibility stuff. I prefer to consider core profile OpenGL to just be OpenGL, with the old stuff being referred to as “compatibility OpenGL” or somesuch. Plus, the core profile has been around for nearly a decade; it’s time we stopped pretending that it’s something new or novel and just call it what it is:
So if you want my opinion, “Modern OpenGL” these days ought to be 4.5 direct state access-based OpenGL. That represents enough of a shift in how you interact with the API that it deserves a term of its own.
Of course, I don’t have the power to make other people use my terminology.
If I were starting today, I would say that you should start with 4.5 DSA-style OpenGL… Despite the oddball function names, it’s much easier to understand what’s going on when you’re manipulating objects directly. Unfortunately, most learning materials use either 3.3 or 4.1 as their default (3.3 because of the older 3.x-class hardware, and 4.1 because that’s the last version that works on MacOSX). So you’d be on your own to some degree.
The major “milestones” in OpenGL are:
[li] 2.0 adds shaders as an alternative to the fixed-function pipeline. This is the minimum version which supports “modern” OpenGL.
[/li][li] 3.0 adds VAOs, and deprecates “legacy” OpenGL features. 3.1 removes the deprecated features, 3.2 has core and compatibility profiles.
[/li][li] 4.5 adds direct state access (DSA).
Every version adds new features, but these are the ones which substantially change the overall programming model, i.e. they either require or encourage the use of features which result in code being fundamentally incompatible with earlier versions.
Personally, I wouldn’t recommend going for 4.5 yet. DSA certainly makes life easier, but you lose compatibility with many existing systems (including a fair proportion of current systems) if you make that a requirement.
Not to forget the whole reason for there being separate 3.x and 4.x specifications released in parallel:
[li]4.0 adds hardware tessellation [/li][/ul]
I firstly started with the book teaching 4.5 but it was very vague. I must have read the stuff many time and still no have the matter understood for myself. That tut sound much easier and I think after that it will be very easy to transfer to the 4.5 book.