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 was reading about OpenGL, and found out the Red Book is a great book for me to read to learn. I then read that even though they have 3.x and 4.x versions, I should still stick to 2.x so I don't create an artificial limit on who can play my game (older computers with older but powerful graphics cards would not be able to run 3.x and 4.x GL software).

So where do I start? I'm lost. Which book? I have no problem reading the 2.x version of the Red Book, which I believe is this one: http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321335732/ref=sr_1_2?ie=UTF8&qid=1290869828&sr=8-2 but I won't know whats deprecated :(

cry for help

share|improve this question
1  
This is practically the same question as this: gamedev.stackexchange.com/questions/1606/… –  Tetrad Nov 27 '10 at 15:00
    
Simple google result that would help: developer.nvidia.com/object/opengl_driver.html –  Tetrad Nov 27 '10 at 15:01
    
And -1 to you if I could, Tetrad. I didn't ask if it was pointless learning OpenGL 2.x, 3.x or 4.x. I asked WHICH book I should use as the best reference. –  shadowprotocol Nov 27 '10 at 16:03
1  
shadowprotocol, then your question is worded totally wrongly. The title indicates whether to choose GL 2.x-4.x, whereas you're meaning books. –  The Communist Duck Nov 27 '10 at 18:14
    
@Duck: If so, it's a dupe of another question: gamedev.stackexchange.com/q/1128 –  greyfade Nov 27 '10 at 22:07
show 1 more comment

2 Answers 2

up vote 3 down vote accepted

http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_1?ie=UTF8&s=books&qid=1290941052&sr=8-1

With shaders, it's possible to use OpenGL 2.1 without the fixed function pipeline that is deprecated in versions 3.x and later.

share|improve this answer
add comment

I have used OpenGL 2 for many years, and I have just recently learned the basics of OpenGL 3. Having learned both, I would recommend without a doubt that you learn OpenGL 2 first. And I wouldn't even say "avoid using functions which are deprecated in OpenGL 3", because pretty much everything is deprecated in OpenGL 3. Basically, OpenGL 3 is ridiculously hard for a newbie to learn, so you should first learn OpenGL 2 and then read up on what it takes to get OpenGL 3 working.

In OpenGL 2, there are two modes of sending mesh data to the GPU -- "immediate mode" (glBegin, glVertex, glEnd) and "retained mode" (vertex buffers and so on). And then there are two ways to have your meshes displayed -- "fixed functionality" (the graphics card will automatically transform your vertices into the correct place on the screen, perform simple lighting calculations, etc) or "custom shaders" (you must write all the transformation and lighting calculations yourself in a language called GLSL).

So whenever you use OpenGL 2, you must make those two orthogonal choices: immediate vs retained, and fixed functionality vs custom shaders. Immediate is easier than retained, and fixed is easier than shaders. But the immediate mode is awful for performance (as you must send the full mesh data to the GPU every single frame), and the fixed functionality will not work for any effects you might have seen in the last 8 years or so, like bump mapping and phong shading. So both immediate mode and fixed functionality have been removed from OpenGL 3.

That's why I recommend you learn OpenGL 2 first. Maybe try immediate mode with fixed functionality. Then go up to retained mode (use vertex buffers). Then try writing a custom vertex and fragment shader in GLSL. Only once you have mastered all of that will you be able to even think about not using any of the deprecated functions (since in OpenGL 3, you must always use retained mode and write your own shaders). Finally, you will be able to switch over to OpenGL 3.

If you are actually releasing a game, OpenGL 2 is fine and will be supported for many years. But there is still a good reason to be using retained mode (speed) and custom shaders (better lighting and cool effects).

share|improve this answer
2  
Great summary of the changes to OpenGL3 –  Ken Sep 19 '11 at 20:50
    
Which online tutorials can you recommend, specifically? –  Anderson Green Dec 14 '12 at 4:25
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.