Good OpenGL books for games?

Pages: 12
Hey, I want to read some good OpenGL game programming books during my break, any good ones out there? I have created a tower defence game in WinAPI, a solitaire game (which was hellish to code mainly due to the data structures and algorithms involved with making it but I've managed to make a good polished one with no bugs), and a space invaders game. Now I want to write games in C++ with OpenGL but I would like a good book like the one a user on this forum recommended to me a while back which was called "Sams teach yourself Windows Game Programming 24 hours." Would there be a good book that is similar to this one but for OpenGL?

Thank you very much guys.
Hey, I want to read some good OpenGL game programming books during my break, any good ones out there? I have created a tower defence game in WinAPI, a solitaire game

Can you give me some game executables? I appreciate it very much!!!!
Hope you didn't waste money on the Sams book. It is a rather commonly voiced opinion among experienced programmers that you should widely avoid books that claim to teach you anything in a set number of minutes, hours, days, or weeks, has "for DUMMIES" in the title, or is written by DS Malik or Herbert Schildt, and avoid C++ Primer Plus like it is the plague.

As for an OpenGL game oriented book, that is difficult because most teach outdated OpenGL API. I'm not really sure of any decent OpenGL books as everyone I view are either, as I stated, outdated or poorly written.
closed account (48T7M4Gy)
https://www.opengl.org/documentation/books/
Yeah, I knew about that link, but I don't think it is well maintained. One link claiming it is a book on Game Development with C++ and OpenGL links to a book about Game Development in C# and OpenGL (assuming you don't mind paying over $600 to get used copies of it).
closed account (48T7M4Gy)
@BHX Are you from the comment police? Try making constructive comments related to the request from the OP.

@Maima FWIW the book BHX fixated on is available for about $50 delivery free to anywhere at https://www.bookdepository.com/Game-Development-Michael-L-Croswell/9780123751034
I am not familiar with the book so I can't say whether it is good value or even suits what you are looking for.
I am not familiar with the book so I can't say whether it is good value or even suits what you are looking for.

It's not. The OP clearly states they are looking for a game development book in C++ and OpenGL. I was pointing out the link you gave doesn't appear to be maintained properly because it shows Allen Sherrod's Essential 3D Game Programming with C++ and OpenGL, but links to Croswell's book which is for Unity and C# (also unavailable at Book Depository).

The only other book on that list which meets their request is OpenGL Game Development by Example (https://www.amazon.com/OpenGL-Development-Example-Robert-Madsen/dp/1783288191/khongrou-20 ) was released in March 2016, but uses OpenGL 1.1 to teach it. This is probably going to be the best bet, but be prepared to find tutorials or buy more books to learn the latest OpenGL version.

Quote from author:
Full disclosure...I am the author of this book. I recognize the criticisms that the book is written to OpenGL 1.1. Keep in mind three things: (1) This book is intended as a primer. The reason for using OpenGL 1.1 is because that is the version that comes universally on all Windows PCs and therefore it is widely available and already pre-installed. (2) There is nothing taught in the book that is invalidated by newer versions of OpenGL, and (3) The book is much more that a book about OpenGL...it is a book about game development using OpenGL. In that regard, it covers other features of game development including good game design, audio, and UI. The reader creates 2 prototype games--one in 2D and one in 3D.

I'll admit this is not an advanced OpenGL book...there are other books that fulfill that purpose. However, this book does exactly what the description says it does. It provides a beginner a good understanding of developing 2D and 3D games.
Last edited on
closed account (48T7M4Gy)
OK Officer. Anything you say Officer.
Last edited on
*Shines new badge*
If pointing out flaws with links means a person is policing the site, then I'll take it. I'd rather police this than leave a person to use a flawed list and end up with a useless book.
Hello, I would suggest the following book:

https://www.amazon.com/Antons-OpenGL-Tutorials-Anton-Gerdelan-ebook/dp/B00LAMQYF2

I have been programming since I was 13, got into graphics programming at the age of 17, that is when I finally felt competent with C++ and several mathematics concepts. I felt stuck like you almost when I reached that point, I didn't know which direction I should take as there were plenty of books out there claiming to be the best yet most of them had (and still have) horrible reviews. However, this one was the best OpenGL book I have ever read in my life. It is currently the best seller as well on Amazon and I highly recommend you buy it.

In case you're wondering, you do not need to be super good at programming to follow along with the book (so long as you know basic C++ like data types and dynamic memory then you'll be just fine) and you do not need to be good at math either as most of the mathematical concepts can be learnt when you're about to use them, that is actually the most effective way to learn math I think, when you want to use it, you'll find yourself more motivated to learn about the concept especially if you have a goal in mind, a project to create, a game etc...

All in all, Anton's OpenGL book is an absolute must, congratulations on making those Win32 games, I'd love for you to share them with the cplusplus community if it's not too much trouble, now go on and create some cooler games with OpenGL and release them on steam!

All the best,
Ron
Last edited on
Thank you all for your recommendations, although I wish no altercation would've taken place between BHX and Kemort, this is a good community and I hope it stays positive. As for you Uk Marine, thank you for the link, I checked the book and you are right, it is a best seller and it does look really good so I'm buying it. I will be posting executable files for the games I've made in WinAPI soon, thank you :)
closed account (48T7M4Gy)
Good luck with your endeavours MVP.
> I will be posting executable files for the games
I'd rather have source.

> I've made in WinAPI
ah... it's a shame.
closed account (48T7M4Gy)
> I've made in WinAPI
ah... it's a shame.


I've never tried but would that mean Qt might be a better platform?
http://wiki.qt.io/Qt_Based_Games
> I will be posting executable files for the games
I'd rather have source.


No never post source. The deficient students in game development would start plagiarizing the materials, I know this because I have seen it with my own eyes, definitely not a good idea. Games like space invaders are assigned to 1st year software engineering (game development) students as a final project that make up a lot of mark of their paper. Many students who struggle in programming tend to flock to the Internet and start searching for pre-existing projects made by other people and claim it as their own. I know this because one of my classmates does just that, he hardly knows how to code and he made it past the 1st year because he plagiarizes everything quite nicely. They change variable names, window size, add/remove several features, basically modify the online project as much as possible to make it look like their own and hand it in for submission on due date. I'd much rather have those struggling students to better themselves by picking up a book and read as oppose to stealing other people's work.

Don't post sources Maima, just exe files.
Also your comment toward WinAPI is quite ridiculous, WinAPI is the way to go for beginners to get started with graphics, such as Maima here. In WinAPI, you learn how to create your own stuff that are essential to apps and games, like a backbuffer for example. In OpenGL and other modern API libraries, you can implement a backbuffer in one line, but most beginners don't even understand how a backbuffer works, unless they had WinAPI experience.
The idea of posting source is peer review. Then we can detect bad programming practices, correct the design, optimize sections, find bugs and learn from your code.

There is also a matter of trust and compatibility with binaries.
However, I'm on Linux so could not compile your WinAPI program.
Could you not run a VM with Windows running in it to compile it?
If you wish to be cross-platform in any way whatsoever, steer clear of WinAPI. WinAPI is less of a graphics API and much more an OS API. OpenGL is cross-platform, but needs an OS-dependent window manager to be useful. WinAPI will only ever work on Windows (also on emulation software like Wine, but results are never guaranteed).

In addition, it is my personal opinion that WinAPI is just plain ugly and much less fun to use than OpenGL.

OpenGL has a learning curve, for sure, but once you get it down it's really not so bad. OpenGL is like a giant state machine. Each function call changes the state of that machine.
OpenGL itself is even more like a specification than a library, since all it ultimately does is specify interaction between you and your graphics hardware.

You could always start with a 2D Graphics API like SFML (http://www.sfml-dev.org/), which abstracts a lot of the nasty OpenGL away for you.

Honestly, a great OpenGL resource is http://learnopengl.com/
There's no reason to spend a huge amount of money on an expensive book. Even in my college OpenGL courses, we found websites like that more helpful than a formal book in some cases.
Using WinAPI is no big deal, and many cross-platform applications directly utilize it. Just make sure to write an abstraction layer of some sort over it to keep it from polluting cross-platform code. The same advice goes applies with any OS-specific APIs, not only WinAPI. AFAIK, SFML has some issues on certain platforms (OS X) when attempting to use modern versions of OpenGL (3.x+) due to using immediate mode, requiring a compatibility context when OS X only supports core contexts. This may have changed, I'm not sure though.

WinAPI and OpenGL serve a completely different purpose, so comparing them is useless.

I can vouch for Anton's book and http://learnopengl.com/ , they're both pretty decent resources for learning relevant iterations of OpenGL.
Pages: 12