Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I wanna start learning OpenGL especially for android game programming but I would eventually want to be able to use this knowledge for windows\linux as well.

I'm having difficulty choosing between the two following books: 1.OpenGL Programming 2.OpenGL superBible

I assume they are both pretty good, anyone here read them (or one of them) and can recommend me?

thanks

share|improve this question
2  
The first book you linked to is extremely disappointing in my opinion. You're off much better reading the specification (which is free, too). Though 15 years ago it was probably a great book, and today for someone who would like to start with historic OpenGL 1.x and maybe look into modern OpenGL later, it will be ok. However, the title "3.0 and 3.1" is entirely misleading. The entire book has about 60-80 pages that deal with modern OpenGL, the rest is deprecated or entirely antiquated functionality, and the book does not make it easy to tell what's deprecated and what is not. –  dm.skt Apr 22 '11 at 10:42
    
what about the second book? –  Amit Ofer Apr 22 '11 at 11:57
    
Have not read the second one, sorry. –  dm.skt Apr 22 '11 at 12:03
    
I've read the second one - it's a good book and deals with a lot of GLUT examples alongwith basic opengl. A good book, but not great. To get your game programming right you may want to get an game programming book with opengl. What's not clear from the question is what do you want to learn - game programming concepts or just a graphic library like opengl or graphic concepts too? There are books for each of the topics... –  Nupul Apr 22 '11 at 19:45
    
I wanna study openGL in general, but my main goal is game programming. which book would u describe as a great book? –  Amit Ofer Apr 23 '11 at 7:09
add comment

migrated from stackoverflow.com Apr 23 '11 at 21:58

This question came from our site for professional and enthusiast programmers.

7 Answers

I would recommend starting with some basic linear algebra, if you haven't done so already, — it is essential for any kind of serious graphics programming. For that, I would recommend Paul Bourke's site. It is also really inspiring.

As dm.skt correctly noted, you don't want to read a book that is not written with modern OpenGL in mind from the beginning — most of them would focus on fixed-function pipeline, which is not just no longer used, it is emulated. Here, I can recommend a great (and free) online book Learning Modern 3D Graphics Programming by Jason L. McKesson. From the intro:

Virtually all of the aforementioned sources instruct beginners using something called “fixed functionality.” This represents configurations in older graphics processors that define how a particular rendering operation will proceed. It is generally considered easiest to teach neophyte graphics programmers using the fixed function pipeline.

This is considered true because it is easy to get something to happen with fixed functionality. It's simpler to make pictures that look like something real. The fixed function pipeline is like training wheels for a bicycle.

There are downsides to this approach. First, much of what is learned with this approach must be inevitably abandoned when the user encounters a graphics problem that must be solved with programmability. Programmability wipes out almost all of the fixed function pipeline, so the knowledge does not easily transfer.

A more insidious problem is that the fixed function pipeline can give the illusion of knowledge. A user can think they understand what they are doing, but they're really just copy-and-pasting code around. Programming thus becomes akin to magical rituals: you put certain bits of code before other bits, and everything seems to work.

This should give you a good starting point.

share|improve this answer
    
Having been taught fixed-function at University and read the McKesson book post-graduation, I can vouch for the argument in the quoted paragraph. They tried to teach me how lighting works, for example, but fixed-function hid the implementation in a black box, so it just felt like material from an abstract math class. –  01d55 Mar 16 '12 at 1:06
1  
If anybody is interested in doing these tutorials on OS X, I am adapting them for use with Xcode and FLGW3 here: github.com/rsanchezsaez/gltut-flgw –  Ricardo Sánchez-Sáez Sep 1 '13 at 13:31
add comment

I am currently reading the SuperBible (fourth edition).

I had previously no OpenGL (or other 3D graphics) knowledge whatsoever, and I find the chapters very clear. The book is well structured too, and you'll quickly find what you are looking for (there is even an API reference at the end of the book). There's a bunch of colored illustrations for most examples too, it's really nice.

All the examples use GLUT, so the code is really focused on using the OpenGL API. However, it's not in that book that you'll learn how to develop a game.

share|improve this answer
    
hi, just bought the fifth edition, I heard its not as good as the fourth but thats what i found. i hope its worth its price :) –  Amit Ofer Apr 25 '11 at 13:33
add comment

A personal favorite: Computer Graphics using OpenGL - Francis Hill Jr. is a good book to get your graphics 'concepts' right and understanding OpenGL along the way. A good reference.

share|improve this answer
add comment

As counter-intuitive as it may seem, I've had the best luck starting with OpenGL introductions in quality books relevant to the platform I'm developing for. OpenGL-specific texts tend to be unapproachably technical and/or academic, to the point at which it's almost as if the author has contempt for beginners.

"Game Programming for the Such-And-Such Platform" books tend to be written in a more casual, readable style that walks you through the basics enough to prepare you to dive into the heavier stuff. In essence, they fill the delta between complete ignorance and "getting it" in a way that more technical books don't seem to have time for.

All this said, you may need to skip over the more lightweight books. Many will tell you what you need to do to get started with OpenGL for your platform, without giving any explanation as to what's going on behind the scenes. To be a good OpenGL programmer, though, it's invaluable to understand some of the "nitty gritty" details since it will help you debug, tune performance, and achieve the exact effects you're looking for.

share|improve this answer
add comment

There are a lot of good books on OpenGL Programming. One I like is the OpenGL SuperBible 5th edition as it explains a lot using the programmable pipeline.

A very good introduction on OpenGL programming on the internet is the following: http://www.arcsynthesis.org/gltut/index.html

Next to using an API I suggest you to first start reading on 3D graphics concepts like Matrices and Vectors. This one is very good in explaining them: http://www.songho.ca/opengl/

Google fixed/programmable function pipeline for explanation. In short fixed function means a lot of OpenGL functions instantiate a standard sort of pipeline on the GPU and programmable is that you have to do it yourself using shaders. (Vertex Shader/Fragment Shader). It is not as hard as it seems though. The upside is that you really understands how a graphics card works.

share|improve this answer
add comment

Personally, I have the Red Book (OpenGL Programming Guide) and the OpenGL SuperBible around as my go to references, along with the OpenGL ES Programming Guide as well since I am focused more on iOS.

I initially tried learning with various intro to OpenGL books over the years, but none of them really helped at all. What really ended up being helpful was looking at various blogs and tutorials and slowly building up to what I was trying to do. I re-wrote whole parts of my engine early on as I discovered new techniques -- so don't get caught up with trying to find a book that covers exactly what you think you need early on. Just get some good references and then use online content to get you moving. Don't neglect reading articles focused on Direct X either -- most of the concepts can be translated between the two APIs with the help of a good reference.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.