PDA

View Full Version : Learning OpenGL, version 3.1 vs 3.3, and The Red book vs. OpenGL Superbible



hakonvl
06-27-2012, 06:55 AM
Hello

I am going to buy a book about OpenGL, but I don't really know which one is the best. The first book I thought of was The Red Book, and maybe OpenGL Shading Language, The Orange Book after that. However, I have also looked at the OpenGL Superbible which covers OpenGL 3.3 and the Shading Language in one. It also includes a reference, which I don't really need, as I can find it on the internet. On the other side, I have borrowed The Red Book at the library, and I can see that many of the functions are marked as deprecated and removed in 3.1 and newer versions. Are these functions of any big interest, or will I have do re-learn most of the things I have read there when using OpenGL 3.3 or 4.x? I know that The Red Book will be released for OpenGL 4 in later this year, but I don't relaly want to wait for that.

So, which book are the best, given that I want to learn OpenGL in depth? And how old hardware is there any point to support today? The newset OpenGL version my own hardware will support is 3.3, so version 4.x isn't really of any interest untill I have bought a new computer. I have also read some critics of the Superbible, stating that they are using some kind of a wrapper lib, is that right, or have they fixed that?

If you know any other books I should read to, just say it here. I am primarly using Linux with C++/C, but I guess that don't matters very much as OpenGL are written in C and most books are using GLUT/FreeGLUT.

I have also searced the forums for simmiar thread, most of the hits were so old that I thing that it would be a good idea to make a new one.

Thanks :)

Janika
06-27-2012, 08:51 AM
I would recommend the red book; even though the material there is behind the current version, it's still functional.

The orange book for shaders.

There's one I really like and it's very decent in explaining stuff:

Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL
By Edward Angel and Dave Shreiner

These 3 books complement each other.

From there you can then upgrade to any new version by referring to the OpenGL specification.

Hope this helps.

kowal
06-27-2012, 10:31 AM
I would recommend this 'book' :
http://www.arcsynthesis.org/gltut

It covers many topics and uses modern OpenGL (v3.3)

hakonvl
06-27-2012, 10:40 AM
Thank you Jason, I will take a look the book you suggested, and I also think that I will stick with The Red Book if nobody says anything else before I buy it in a few days.

Have anybody looked at the Learning Modern 3D Graphics Programming (http://www.arcsynthesis.org/gltut/) by Jason L. McKesson? I also think I will take a look at that, though I will wate until I have read The Red Book.

Edit: Sorry kowal, I started writing my post before you finnished yours. I have seen that book, and as written over I plan to read it. However, I think it focues a bit more on graphics programming in general, so I think the best will be to read both books, maybe "Learning Modern 3D Graphics Programming" as the second.

aqnuep
06-27-2012, 11:27 AM
Well, I wouldn't recommend the Red Book at all as 90% of what you learn there is legacy OpenGL. I'd rather recommend the latest edition of the OpenGL Superbible or the link kowal mentioned. These teach you modern OpenGL and how to efficiently use your GPU. While the learning curve may be steeper, you'll get a better understanding of how GPUs work and how to write an efficient yet simple renderer.

menzel
06-27-2012, 11:47 AM
I also wouldn't recommend the Redbook anymore, it will teach you outdated stuff and new APIs and wound tell you what you should use from those nowadays and why...
For GLSL the "openGL 4.0 Shading language Cookbook" by Wolff might come handy. It woun't teach you GLSL or OpenGL itself, but it will give you shadercode for general problems and explains this code to you, so after you have learned the basics of GL and GLSL, this might help you diving deeper into it.

hakonvl
06-27-2012, 12:04 PM
Does the Superbible teach me everything I should know as a beginner then? Even though it is over 1000 pages long, many hundred of these pages are used for the OpenGL reference which I easily could look up at the internet.

Maybe that combined with the Modern 3D graphics E-book would be a good combo?

Edit: I looked over the Superbible code, and they use some kind of a library called GLtools (http://code.google.com/p/oglsuperbible5/source/browse/#svn%2Ftrunk%2FSrc%2FGLTools). I havent really looked into how it is organized, but I feel a litle bit sceptical. Also, it looks like they use som OOP interface for OpenGL, maybe it's the GLtools-thing, example:


// Black background
glClearColor(1.0f, 1.0f, 1.0f, 1.0f );

shaderManager.InitializeStockShaders();

// Load up a triangle fan
squareBatch.Begin(GL_TRIANGLE_FAN, 4);
squareBatch.CopyVertexData3f(vVerts);
squareBatch.End();

Copyed from this (http://code.google.com/p/oglsuperbible5/source/browse/trunk/Src/Chapter03/Blending/Blending.cpp) page, from line 35 to 43. Is this something I should avoid?

hakonvl
06-28-2012, 01:35 PM
Oh, are the Orange book too outdated so be of any use today? I was thinking if I could read The Red Book first, and then the Orange Book. I am just a litle bit sceptical to the wrapper in the Superbible, there is many people who says that it hides many backround tasks without telling how you should do that without using the wrapper library.

hakonvl
06-29-2012, 03:45 PM
Thanks for the help, I will print out the Learning Modern 3D Programming e-book and read it. After I have finnished it I will buy the Superbible, or wait for the new edition of The Red Book, it depends on how long time I have to use on the e-book. I will not be able to really start on this this month I think, as I am much away, and I have some other projects that I have to finnish first, so maybe the wait time isn't too long. And again, thanks for the help.

And is there a lock on the edit button which goes on after a certain time? I was goint to edit my last post, but I couldn't find it.

deduu10
06-30-2012, 12:28 AM
Well, I wouldn't recommend the Red Book at all as 90% of what you learn there is legacy OpenGL. I'd rather recommend the latest edition of the OpenGL Superbible or the link kowal mentioned. These teach you modern OpenGL and how to efficiently use your GPU. While the learning curve may be steeper, you'll get a better understanding of how GPUs work and how to write an efficient yet simple renderer.

aqnuep, I have openGL Redbook seven edition (The official guide to learn openGL 3.0 and 3.1) by Dave Shreiner. Does it teach 90% the outdated stuff also?

Thanks