I stumble upon the search of a good resource to start with OpenGL (3.0 or later) . Well, I found a lot of books but none of them can be considered a good resource!

Here two examples:

OpenGL Programming Guide (7th edition) http://www.amazon.com/exec/obidos/ASIN/0321552628/khongrou-20 This is FULL of deprecated material! Almost every chapters begin with a note about that.

OpenGL Superbible (5th Edition) http://www.amazon.com/exec/obidos/ASIN/0321712617/khongrou-20 This book uses a library created by the author to explain the main arguments, hiding what you want to learn! I don't want to learn how to use your library! I want to learn OpenGL!

I hope that you understand this is not the same question like "hey I'm not able to use Google... tell me how to learn OpenGL". I've just finished a full and deep search but I can't find a good and complete resource to learn the "new" OpenGL avoiding deprecated topics.

Can someone heading me in the right direction? I know C++ and I have 10 years of experience in development... where I can find a good resource?! I want to spend time on it and I want to learn deeply.


7 Answers 7


I agree about the above books with a few notes:

  • The OpenGL programming 8th guide is now out and has be redone for modern OpenGL 4.3.

  • The SuperBible 5th ed, does provide you will a crutch library to start off but as you go through the book you reimplement the functionality of that library so by the end of it you should be fully versed. I also highly recommend wrapping OpenGL stuff in something if your using a object orientated language. I'm working on my own library for fun which seems to be the way to go, implementing it myself I understand all the ins and outs and I only need to put in the bits I actually use. Also you can abstract away some things like sending data to shaders (isn't shinyMaterial.setColor(Red) much nicer), this can also let you backport some stuff by providing legacy alternatives. There is also oglplus.

The main problem with learning modern 'core' OpenGL is that to get a basic pipeline up and running even if it's just to draw a cube you need to understand the following:

  • Matrix operations (use GLM if you on C++, you will also need a MatrixStack OpenGL Unofficial SDK's version here, or my simple one here.)
  • GLSL shader programming.
  • binding data to shaders and Vertex Buffer Objects. If you wanted to learn just real pure core profile they would all need to be implemented simultaneously and if anything is broken you just wont see anything and have almost no clue where it went wrong. That also doesn't cover things like basic lighting (where you need to learn the shading algorithms in addition to the programming language).

But you don't need to start in the deepend with the core profile. Use some of the deprecated functionality at the beginning, just about everything will still support it, then modernize it.

Another issue is that 'modern' OpenGL can really refer to 3 things:

  • The first one is the programmable shader pipline as opposed to the fixed function pipeline. The core 'modern' techniques have been possible since OpenGL 2.0 was released in 2004 when shaders where introduced (the tutorials just didn't get updated) also 1.5 had Vertex Buffer Objects's which are another cornerstone of modern OpenGL. A problem is that even today OpenGL developers might not even be able to take advantage of all that stuff, there are plenty of crappy netbooks out there with those Intel chipsets that only support OpenGL 1.5 and phones such as older iPhones/Android ones that only support OpenGL ES 1.1. The only real difference between this stuff in OpenGL 2.0 and OpenGL 3.x/4.x is it's now mandatory for the core profile.

  • Modern OpenGL could also refer to the new stuff that's in 3.x, 4.x. Things like Vertex Array Objects, Framebuffer Objects, Uniform Buffer Objects/std140, layout qualifiers, GLSL subroutines and so on. Many of those I have found can make things much much nicer to program with. They can also subtly change your overall engine pipelines. They are also things that with a little effort you can backport by making helper functions and so on (For example write a generic shader manager object that you can use to set uniforms, if UBOs are supported use that otherwise manage uploading the values to shaders manually, maybe put a little shader rewriting stuff in there to automate it). This stuff only runs on new video cards, you wont see any netbooks supporting it or any current generation video game consoles (they use their own subset of OpenGL similar to OpenGL ES). The latest OSX only have 3.2 support and I understand that they will be fixed at this version forever since Apple write their graphics drivers and specify OpenGL versions based on the OS version not the GFX drivers/video card capabilities the only way for a user to get a new OpenGL on a current generation Mac would be to pay for an upgrade to a new version of OSX.

  • The Ultra Modern nextgen OpenGL. OpenGL 4.3 was just released. It comes with compute shaders, glMultiDrawElementsIndirect and shader storage buffers. This allows for a fundamentally different pipeline where you upload all the vertex data to the GPU and then use compute shaders to calculate what should be drawn rather than doing it in your program. Unfortunately this is very new so I don't know of any decent tutorials on it. Take a look at the OpenGL 4.3 review which gives an outline of how this works (also the author says there is a GPU Pro article to be released explaining it). Being brand new it's not going to be supported anywhere at this stage (unless you're on a newer nvidia card with beta drivers). Although you might be able to use OpenCL/CUDA to implement some of it.

I would skip glBegin, glEnd, glVertex*, glNormal*, glTextCoord*, glTranslate*, glRotate*, glLoadIdenity, glModelViewMatrix and so on. Instead start with learning Vertex Buffer Objects without shaders, don't try 3D at this point just a flat white triangle so you don't have to work with 3d operations using matrices (as you will need to learn to bind them to shaders soon so no sense in learning to old way). Next add in in the shaders, you will need to change how your vertex buffer objects are bound since you will now want to use vertex attributes. Learn how to communicate properties to them via uniforms. Then learn matrix operations with GLM, bind the matrices to the shaders and get 3D going. Once you have that done then it's basically just learning more advanced things like texturing, lighting and some special features like framebuffer objects, vertex array objects, uniform buffer objects, GLSL routines and so on (those are all things I recommend you have a look at. Most of it is fairly new except for texturing and lighting but if you learn them as shader concepts rather than as OpenGL ones, you should get the modern approach).

Some general online modern OpenGL tutorials, covering the shader programming pipeline that most of which works with OpenGL 2.0+:

For other general learning resources. OpenGL ES might be a good starting point. OpenGL ES has stripped out all the deprecated stuff. OpenGL 4.1 has full compatibility with OpenGL ES so it should be possible to take an OpenGL ES program and run it in OpenGL 4.1. And the basic principles are the same for both.

Some things to note is that OpenGL ES 3.0 has just been released but as it's new, it won't have any tutorials or hardware support yet. It doesn't seem to have any major fundamental changes (like the difference between fixed pipeline and shader model that we saw with OpenGL ES 1.0->2.0). So you probably won't be learning any out of date stuff.

Also, OpenGL ES will often be using EGL so you will need to learn another way to open a Window but that shouldn't be too hard. Otherwise there are a few OpenGL ES wrappers/emulators around or you can learn on Android/iPhone if you have one (or look at using their emulators).

There is the Addison Wesley OpenGL ES 2.0 Programming Guide which is the equivalent of the red book.

You can also look at GLSL shader focused stuff since that's where most of modern OpenGL lives. You just need to ensure what you learn covers the OpenGL binding 'glue' side of things.

Check out the OpenGL Shading Language 2nd edition (Orange Book).

The OpenGL 4.0 Shading Language Cookbook covers some more bleeding edge OpenGL stuff but isn't itself a comprehensive tutorial. Its definitely worth a look to get some understanding in the latest real world OpenGL practices such as uniform buffer objects and GLSL subroutines.

Finally you could have a look at WebGL, although being in JavaScript that is going to be somewhat different and much harder to debug.

  • 3
    \$\begingroup\$ +1, wow. The only small change I'd suggest would be using client-side vertex arrays at the start as they're an easier path to VBOs but without some of the bear traps that beginners can fall into. \$\endgroup\$ Commented Jul 24, 2012 at 19:19
  • 1
    \$\begingroup\$ I figured it was best to avoid specifically learning/using deprecated functionality since that would be stuff that would have to be unlearned. The other deprecated stuff I suggest using is things that OpenGL will do by default, like being able to render without using a shader and assuming vertex attribute 0 is the position both of which should explode when switching on the core profile. \$\endgroup\$ Commented Jul 24, 2012 at 23:39
  • 2
    \$\begingroup\$ The 6th edition of the SuperBible has just been released and it is MUCH better than the 5th edition. I highly, highly recommend it, it's easy to following and learn modern OpenGL with. \$\endgroup\$
    – Philip
    Commented Aug 25, 2013 at 3:27
  • 2
    \$\begingroup\$ The Arcsynthesis gltut site is no longer available, but the tutorial can still be downloaded from bitbucket.org/alfonse/gltut/wiki/Home \$\endgroup\$ Commented Jul 20, 2015 at 18:00

Forget about books at least until the 8th edition of the programming guide comes out.

Besides the mentioned tutorial, I found this site to be helpful, since it goes past the basics fairly quickly. They're both a great introduction to modern OpenGL. Once you get past that, you'll only need the documentation, OpenGL is easy to use once you get used to it. The rest is computer graphics theory and mathematics.


I have been in the exact same situation as you and have finally found what I needed to get going.

First off head here: http://www.arcsynthesis.org/gltut/. This site is fantastic, good working examples and deep explanation of what is going on. Even though the code is written in C++ I'm using this to teach me writing OpenGL demos in Lisp. It also is totally free of the old way of doing things so you don't have to worry about picking up bad habits.

I would stress that even though its 'just another website' I haven't found any books which give as clean and concise an explanation of the basics as this does.

Once you have got through the site above you will already have a basic grasp of shaders and a lot of what you need to know can now be googled (have a good look at the opengl es or webgl resources as they removed all the deprecated stuff) or found in the opengl wiki site. The later is horrendously cryptic if you don't have the fundamentals from the arcsynthesis site under your belt but quite helpful when you know roughly what you are looking for.

Also for a really deep look at GLSL then have a gander at: OpenGL Shader Language (The Orange Book) I'm working through this very slowly but will give you the understanding of writing shaders to allow you to take this pursuit on further. I'll warn you that this book does have, in the words of a reviewer, "200 pages of top quality content packed into a 600 page book" but the extra history and info can provide the context you need to understand the routes that OpenGL as a standard has gone down (well it's helping me anyway!)

I hope this helps and best of luck, I look forward to seeing/playing your work in the future!


It seems arcsynthesis is sadly offline, however the site has been converted to pdf here and the code has been mirrored over here.

Also in the few years since my original answer learnopengl.com/ has become absolutely brilliant. Whilst I still recommend arcsynthesis for the raw excellence of its introduction to modern opengl, the learnopengl site covers far more that arcsysthesis did, and manages it with approachable language, we crafted examples and open source code. Basically, it's damn good, go check it out!

With regard to books I didnt get too far with the orange book but can recommend the third edition of 'Real-Time Rendering'. Once you are ready for the technical stuff, this book is a goldmine.

  • 2
    \$\begingroup\$ OMG! the first link is fantastic! \$\endgroup\$
    – MatterGoal
    Commented Jul 24, 2012 at 14:37
  • \$\begingroup\$ The gltut site is no longer available, but the tutorial can still be downloaded from bitbucket.org/alfonse/gltut/wiki/Home \$\endgroup\$ Commented Jul 20, 2015 at 17:59
  • \$\begingroup\$ Good point, I'll update my post with extra recommendations also. \$\endgroup\$
    – Baggers
    Commented Jul 21, 2015 at 7:48

Also check out Open.gl. It has tutorials using modern Open GL


Two sites that have been very helpful for me are: http://www.arcsynthesis.org/gltut/ and http://ogldev.atspace.co.uk/

Also, the OpenGL wiki is an extremely good and up-to-date resource.

Once you get through these, I highly recommend biting the bullet and reading the OpenGL specification. Then you'll be a pro.

  • \$\begingroup\$ Yes, I find the online tutorials to be much more useful than most books. The SuperBible 5th edition is extremely disappointing. \$\endgroup\$
    – Philip
    Commented Aug 3, 2013 at 14:53
  • \$\begingroup\$ The gltut site is no longer available, but the tutorial can still be downloaded from bitbucket.org/alfonse/gltut/wiki/Home \$\endgroup\$ Commented Jul 20, 2015 at 18:00

The best book I've come across that covers "modern" OpenGL is http://www.packtpub.com/opengl-4-0-shading-language-cookbook/book

Even though it's a "cookbook", it does walk you through necessary steps to set up rendering and what kinds of companion libraries you'll need (image lib, vector math lib).

In addition to that it goes through all sorts of common things you might want to use OpenGL for, without digging too deeply into anything (like for shadows, it covers shadow mapping and filtering shadow maps, but doesn't go into any of the more complex shadow mapping methods).

I also recommend getting the orange book.

  • \$\begingroup\$ Thank you @Jari. Isn't it "only" about shader? I mean, does this book introduce to OpenGL techniques as well as shaders? \$\endgroup\$
    – MatterGoal
    Commented Jul 24, 2012 at 14:36
  • 2
    \$\begingroup\$ @MatterGoal: Modern OpenGL is almost completely shader based. This book does cover the OpenGL binding side of things. I also recommend this book but as a companion to something else, its not really for core learning book but does show some great realworld uses of moddrn practices. \$\endgroup\$ Commented Jul 24, 2012 at 15:04

Some more Tutorials and stuff which wasn't mentioned but helpful

  • \$\begingroup\$ +1 To add to the list, there's OpenGL tutorials by Aks which is not very structured but has enough information for setting things up. \$\endgroup\$
    – legends2k
    Commented Oct 26, 2013 at 7:15

Not the answer you're looking for? Browse other questions tagged .