Back in the days when I started with OpenGL the question where to start was often answered in the same way: Get a copy of the Redbook and/or look at the NeHe Tutorials. Since then OpenGL has moved on but these ressources not so much. The Redbook covers also more modern OpenGL but still starts with the outdated immediate and does not tell you what to do and what better not to do anymore – it just presents both ways. Nehe marked the old tutorials as ‘legacy’ and seem to prepare new one, which is a good thing.
So when I get asked today what good resources there are for beginners wanting to learn OpenGL it’s harder to answer that than ever. But diving into modern OpenGL has become a bit more complicated: You need shaders, you have to work with transformation matrices, geometry gets defined in arrays/buffers… I can see the benefit of presenting the immediate mode first together with the fixed-function pipeline, it’s simpler to learn. It is also a waste of time as this is not helpful for any modern real world OpenGL application. If you want to do mobile OpenGL ES apps, WebGL in your browser or modern OpenGL on MacOS X, you can’t even use the old fixed functionality – it’s not a performance limitation, glBegin is just not there!
So, if you want to learn OpenGL, bite the bullet and avoid all tutorials and books that want to tell you that glBegin() is good idea.
For absolute beginners, I have found two very good online tutorials:
- http://www.arcsynthesis.org/gltut/ by Jason L. McKesson
- http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html by Jeo Groff
In case you like dead trees, try the very good OpenGL ES 2.0 Programming Guide by Aaftab Munshi et al. OpenGL ES is a bit different from desktop GL, but it forces you to use more modern concepts. What you learn there can be adapted quite easily to desktop GL.
Also a very good beginners book is OpenGL 4.0 Shading Language Cookbook by David Wolff. It only covers the shading language of OpenGL and some glue-code to set up shaders but as OpenGL gets more and more programmable this really covers a lot of GL. A huge plus of this book is that it contains practical solutions for common problems (like lighting, basic texturing etc). It is a good companion to a more general OpenGL tutorial or book.
WebGL made it easy to deploy OpenGL samples, so grab a WebGL capable browser and have a look at ShaderToy by Inigo Quilez. This app lets you play around (=code) fragment shaders in your browser and instantly check the results. Definitely a good way of losing the fear of those little programs.
Having a copy of the OpenGL specs is often handy, but these are not good for teaching you what to do, they are only good in telling you what exactly a function does and which side-effects it can have.
Problems with all the math or just general concepts of 3D graphics? The book Real-Time Rendering by Tomas Akenine-Möller is a very good graphics textbook. It has also a good website with further information.
If you know other good resources for beginners, drop me a comment.