Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I will be working on a 3D project and i need to learn c++ and opengl fast. as i have heard it is the best combination to do graphics. I would also like your recommendation on this book I came across:

Angel E, Interactive Computer Graphics: A top-down approach with Open GL, 5th Edition, Addison Wesley 2008

what do you recommend? thanks!


migration rejected from Jul 15 '13 at 16:52

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by gnat, MichaelT, Kilian Foth, GlenH7, Dynamic Jul 15 '13 at 16:52

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

For OpenGl I found HeNe to be pretty good. Explained things in simple easy to digest chunks. – Jay Jun 29 '11 at 14:52
sounds daunting and terrifying and potentially a lot of fun :) – Doug T. Jun 29 '11 at 15:48

There is no such thing as a fast track to C++. C++ is one of the most complicated languages to master properly. And also OpenGL and computational geometry is a vast field, time consuming to learn.

OpenGL is some graphics API. But saying it was the best API for graphics is like saying a workshop full of tools and all the raw materials are the best for driving on the Moon.

OpenGL is a toolbox and it provides some raw materials. But the bulk work is up to you, and if you don't have a considerable amount of knowledge about

  • linear algebra
  • geometry
  • programming
  • core concepts of the C programming language (the OpenGL API is designed along C)

you'll get stuck early trying to learn OpenGL.

So this is what you need to master:

  • linear algebra and geometry and some calculus (assume at lest 1 year for learning this)
  • C programming (you can learn the language in about 6 months, but it takes at least 3 years to fully master it, if you use it continously)
  • if you want to implement some of the sophisticated graphics algorithms you'll also need some topology and differential geometry (consider this some additional 2 years of learning)

So if you're really going for this, you need patience and some stamina, but it is worth it. So which resources do I recommend:

  • "Computer Graphics – Principles and Practice", a must have read
  • Some higher math textbook, undergraduate level. For German readers I recommend the books by Klaus Jänich "Lineare Algebra" and "Analysis für Physiker und Ingenieure"
  • For learning C "The C Programming Language" by Kerninghan and Ritchie
  • For learning C++ "The C++ Programming Language" by Strostroup and for further reading
    • "Modern C++ Design" by Alexandrescu
    • "C++ Coding Standards" by Herb Sutter
  • "The OpenGL Programming Guide" aka "The Red Book", it is something between the specification and tutorials; I've never read the Superbible, so I can't tell you about this.
  • Work through all the papers on the developer website of NVidia and ATI/AMD
For C++ resources, I'd link to the C++ Book list over on SO. – greyfade Jun 29 '11 at 16:01

Before I begin, in the interest of full disclosure, I have my own set of intro OpenGL tutorials. So feel free to take my assessment in that regard.

First, ICG 5th edition has been supplanted with ICG 6th edition, which teaches from shaders. You should look into that, as shaders are important. However, looking at the blurb on Amazon, it seems to stop with OpenGL 3.1, for some reason. 3.2 and 3.3 all run on the exact same hardware as 3.1, so there's no reason for them to have stopped there (except for the production and publication date, of course). So some of the information may be out of date. There don't seem to be any reviews up on Amazon as of yet.

You also may want to consider the 5th edition of the OpenGL Superbible. I'm more familiar with this one, but I think some of its teaching methadology is flawed. It uses a large C++ framework to make it easier to show how to do things, which is fine. What I have a problem with is that it starts with the framework, then later teaches about the OpenGL calls it makes behind the scenes. I've seen more than one question from users of the Superbible who were confused as to where OpenGL ended and the Superbible's framework began.

There are quite a few online resources. I would suggest avoiding any online tutorials that don't use shaders, as you can't really call yourself a graphics programmer these days without the ability to use them. The OpenGL Wiki plays host to a number of OpenGL 3.0 or better tutorials that all teach shaders for the beginning programmer. Again, in the interest of full disclosure, I wrote one of them.


Unless you are writing for the very highest performance ( and if you are having to learn C++ for the job, you won't achieve it because you won't yet be good enough at C++ to do it ) I would definitely look for a 3D binding for a language you already know. There are good Direct3D ones for .net, you can use OpenGL from Java ( I believe Minecraft was written that way ) and you will have a hard enough time mastering 3D programming without having to master a difficult new language at the same time.

Also, unless you have a very specific and specialised application in mind, please don't reinvent the wheel. There are so many 3D engines, scenegraph APIs and other helpers for 3D programming around, both open and closed source, that will help you get the job done a lot more quickly and easily. I would certainly look at those before thinking about rolling your own.


Using C++ and OpenGL/DirectX is the most used way to create top games. However, there are easier alternatives. Xna & .net for example.

You'll still need to learn C#, the XNA framework and some basic math.


For OpenGL, I recommend The OpenGL Superbible, which came out in a new edition just a year ago.

Here's a review at slashdot: OpenGL SuperBible 5th ed.

...If you are new to both 3D graphics programming and OpenGL with a bit of C/C++ programming experience and you are eager to learn how to develop interactive programs with OpenGL, then this book is exactly right for you. The book is written in an easy to understand style without skimming the details (or even more advanced topics). It is the most comprehensive introduction to OpenGL that doesn't require a lot of previous knowledge I have seen to date. The decision to completely drop any discussion of the fixed-function pipeline turned out to be an excellent choice. Finally there is a book that no longer wastes the reader's time with the parts of OpenGL that nobody who does serious graphics development uses and instead presents up-to-date information on how to do 3D graphics on modern graphics hardware.

All in all, the OpenGL SuperBible in its fifth edition succeeds very well in keeping its promise to be the best introduction to OpenGL and 3D graphics programming. Even after you're done working your way through the main parts of the book you will always come back to the handy OpenGL API reference in the appendix of the book...