PDA

View Full Version : Best openGL books?



Bluebomber357
08-01-2009, 11:14 AM
When I look at Amazon and online in general, it seems like most books are out of date. What books do you all use?

scratt
08-01-2009, 12:50 PM
The Orange Book.

OpenGL SuperBible or The Red Book as a standby for fixed function stuff.

Other than that the OpenGL site itself, and the Lighthouse3D GLSL website are both good sources.

James A.
08-01-2009, 11:20 PM
The Orange Book, and the latest red book.

I think a new version of the orange book will be out soon.

Aleksandar
08-02-2009, 03:36 AM
Be patient!

This month two new books should be published:
- OpenGL Programming Guide: The Official Guide to Learning OpenGL, Versions 3.0 and 3.1 (7th Edition), and
- OpenGL Shading Language (3rd Edition)

Although Amazon claims that the books are "In Stock", I think the new Red and Orange book will be available in one or two weeks.

Dj3hut1
08-02-2009, 06:24 AM
Hello,

I hope the 7th edition of the red book will be completely rewritten for teaching the new programming model and not be only a reprint of the 6th edition.

dj3hut1

Aleksandar
08-03-2009, 04:07 AM
I'm sorry that I have to post some bad news. :o(

1. Red Book 7th Ed. has been published (last week)
2. The book is just REPRINT of previous version with some small changes!!!

It was promised that 70% of the book will be rewritten, but take a look ... This is the table of contents of new Red book:
http://www.pearsonhighered.com/educator/...0321552624.page (http://www.pearsonhighered.com/educator/product/OpenGL-Programming-Guide-The-Official-Guide-to-Learning-OpenGL-Versions-30-and-31-7E/9780321552624.page)

Next review also confirms that the changes are negligible:
http://www.amazon.com/OpenGL-Programming...howViewpoints=1 (http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/product-reviews/0321552628/ref=dp_db_cm_cr_acr_txt?ie=UTF8&showViewpoints=1)

And the third proof is a sample chapter (Ch.2) that can be downloaded from here:
http://www.informit.com/store/product.aspx?isbn=0321552628

I hope the new Orange book is much better...
Although chapter organization is the same as in 2nd Ed., code is rewritten. Chapter 6 can be downloaded from here:
http://www.informit.com/store/product.aspx?isbn=0321637631

Heiko
08-03-2009, 05:30 AM
Does anybody know whether a fifth edition of the OpenGL Superbible is in the making? I own the fourth edition, which is a great book (finished reading it in two weeks, still using it for code examples and API). Unfortunately I had the sloppy version of the 4th edition and some of the coloured pages are now loose. It also shows some serious signs of heavy use.

If a 5th edition which is up to date (OpenGL 3.1 or even 3.2) is released, I'll probably buy it.

Aleksandar
08-03-2009, 05:42 AM
There are no signs that OpenGL Superbible 5th Ed. will be released in foreseeable future.

ZbuffeR
08-03-2009, 07:12 AM
Indeed "The Orange Book 3rd ed." looks like the most up to date :
http://3dshaders.com/home/index.php?option=com_content&task=view&id=23&Itemi d=1

Aleksandar
08-03-2009, 12:07 PM
Not any more!
OpenGL 3.2 and GLSL 1.50 are released today!!! :o)

WOW!!!

This night will be very long. There are new specs to be read! ;o)

bootstrap
08-09-2009, 01:47 PM
I spent much of the last 3 days scanning and reading through the just-released red-book (OpenGL programmer guide) and orange-book (GLSL shader book).

##### red book #####
I am NOT impressed (at all) with the red-book. The authors are lazy, simple as that. The book is mostly for any poor-sucker stuck programming OpenGL v1.50, because that's mostly the era it focuses upon. It does *mention* most of the new features of OpenGL v3.00 and v3.10, but it contains mostly superficial information - though in some cases it does appear to contain correct detailed information.

Since anyone stuck with OpenGL prior to v3.00 has perfectly excellent OpenGL books available (especially the superbible), the new red-book should have been pure v3.00 and v3.10 information. Sadly, the red-book doesn't even clearly/carefully distinguish old content from new content. Oh, it does mention the distinctions here and there, it's not avoided altogether, but it is not consistent. Only because I have been programming intensively with OpenGL since v2.10 and GLSL v1.10 can I infer which features are "old" and "new". Newbies will suffer big time! They did include a folded-up architecture sheet with OpenGL v3.00/v3.10 on one-side, and oldie-moldie pre-v3.00 on the other side, but that is very insufficient.

I hate to say this, but it appears that a few of us need to TELL the OpenGL folks that WE will write a new red-book from scratch. Or better yet, just eject it out the airlock and get the OpenGL SuperBible guys to do their typically excellent job --- BUT somehow force them to write their next version based upon PURE v3.00+ OpenGL. I am terrified that they will make the same lazy mistake as the red-book authors [and their masters]. Probably the publisher wants to sell more expensive books, which means "more pages". Typical modern thinking... screw the customer.

The index of the red-book is TERRIBLE. I doesn't even contain entries for most new features. The first thing I did was to open the book and look in the index to find "texture arrays", "VAO", "vertex array objects", and several other new features. What did I find? NOTHING. What BS. Lazy, lazy, lazy!


##### orange book #####
The GSLS books have been simply excellent, and the new version is excellent too. While it doesn't avoid older GLSL features entirely, at least it has the feel of an "up to date" book, unlike the red-book. So far the GLSL authors have put substantial effort into every new edition, and we appreciate that very much.

-----

The bottom line is: the orange book is great, and those authors deserve our praise and cash. However, it appears the PDF files on the OpenGL website are now better than any other resource for learning [newer versions of] OpenGL. And that's just sad. If any of the SuperBible authors are reading this, please do what WE want and demand --- REMOVE ALL DEPRACATED FEATURES FROM YOUR NEXT BOOK. You will then be the ONLY viable OpenGL programmer guide book, and we will back you 100%, sing your praises, promote to everyone, buy multiple copies for ourselves, and scratch your back when you itch (cuz you scratched ours!). :-)

BionicBytes
08-10-2009, 11:01 AM
I second the opinion of bootstrap and think he's spot on.
I've been programming OpenGL since version 1.2 and it's now mandatory that all *new* reference material is bang upto date - that is refer only to core funtionality of OpenGL. Optional extras like the compatability and ARB/EXT extensions can be added as extra supplimentary info, but not intertwinned with the main content.

One of the biggest complaints I have with the Red and Orange (5th/2nd editions) is that they seem to mix fixed function ideology with programable shader concepts- resulting in a lot of uncessesary clutter. The chapter(s) on lighting are a perfect example: they often use the glNormal matrix and then have to undo it during transformation via the inverse model view matrix just to 'undo the effects of the camera' - but really they shouldn't have used legacy functions at all and could have avoided the uneccessary overhead and confusion.

Looks to me like the authors are caught between writing a book which documents how it used to work and how we should be doing it now. The result is that you can only take the exmples with a pinch of salt because they are just not suitable for a proper shader-based architexture.

It's very disapointng that authors for the next generation of 3.x books continue in this vien. We are now looking for books without the clutter of the past, and lookforward to nice, clean and simple documentation of the CURRENT API which has been published. If legacy feature are depreciated - then depreciate those from books as well!

Aleksandar
08-29-2009, 12:21 PM
##### orange book #####
The GSLS books have been simply excellent, and the new version is excellent too.
I am a little bit disappointed with the Orange book 3rd Ed. Although it is good for someone who starts with GLSL, and for keeping global overview of the language, there is almost nothing from the new stuff. I was very excited when I saw Named Uniform Blocks in the content table covering 4 pages. But, there are only functions declarations and parameter definitions. No one useful peace of code. If named uniform blocks are so important that became a part of GLSL 1.4, and GLSL 1.5 even introduces interface blocks as a generalization of uniform blocks, I think it deserves more attention in the book. None of the working examples contains blocks. There is also only a trace of layout qualifier. Once again, none of the working examples contains layout qualifiers. (Oh, yes, they are commented part of the code on the page 483). Nevertheless, I'll continue reading to the last page, and then make a final comment on the book.

Unfortunately, OpenGL Registry (extension definitions and specifications) is still the best literature to learn new functionality. :(

V-man
08-30-2009, 06:07 AM
The index of the red-book is TERRIBLE. I doesn't even contain entries for most new features. The first thing I did was to open the book and look in the index to find "texture arrays", "VAO", "vertex array objects", and several other new features. What did I find? NOTHING. What BS. Lazy, lazy, lazy!

Sorry to hear that. I don't use the Red Book, but if you want a source of information, read the Wiki. It talks about VAO among other things.
As for texture arrays, there is nothing yet but perhaps someone will one day add that.

The entire Wiki is not GL 3.2 specific since GL 2.1 will be around a long time and so will GL ES but at least it covers a couple of concepts and there are tutorials.

bobcap
09-11-2009, 04:55 PM
I've seen the disappointment in the latest version of the Red book (7th edition), but as a newcomer to OpenGL, without any books, is it a good choice?

Thanks.

Dark Photon
09-11-2009, 07:01 PM
I've seen the disappointment in the latest version of the Red book (7th edition), but as a newcomer to OpenGL, without any books, is it a good choice?
For a newbie, yes. It's only the more seasoned GL developers that want only the "latest-and-greatest" stuff that aren't as fired up about it.

I still use it for reference occasionally, and it's got some good tutorial sections and examples. Great for getting started. I'm in the 5+ years bracket, so I don't use it so much anymore, but when I was getting started that was "the" source for help. The OpenGL spec was complete greek.

Nowadays I prob use the OpenGL spec more than the red book, and use the OpenGL extension specs more than both combined.

OpenGL SuperBible is a good one too. And I also have Advanced Graphics Programming in OpenGL (4 yrs old now), but confess I didn't used it much. And when you get your your bearings and are ready for shaders, I highly recommend the OpenGL Shading Language 3rd edition (Orange Book). Excellent.

Warning!: Next you'll hear from those gurus that didn't like the Red Book because "real men don't use the fixed function pipe! -- It's deprecated -- Real men use shaders". This is the "real men only code in assembly" argument applied to OpenGL. No, it's not necessarily assembly, but doing shaders requires a more intimate knowledge of the GPU than most newbies want when they're trying to get their first box to show up on the screen or their first robot arm to move correctly. That's better bitten off later after you've swallowed the basics.

So yeah, go for the Red Book. Ask questions on the Beginners forum as you need help. And branch off from there.

Alfonse Reinheart
09-11-2009, 07:14 PM
This is the "real men only code in assembly" argument applied to OpenGL.

Sorry, no. The reasons for wanting a book that teaches core OpenGL are:

1: It gets people to stop using deprecated functionality.

2: It focuses attention on what is likely to be the fast rendering path for the majority of hardware.

3: It introduces people to shaders early, which is not nearly as complicated as you make them sound. Really, shaders are quite simple when properly explained, and getting basic functional rendering working with shaders isn't particularly difficult compared to the fixed-function.

Dark Photon
09-13-2009, 01:14 PM
3: It introduces people to shaders early, which is not nearly as complicated as you make them sound. Really, shaders are quite simple when properly explained, and getting basic functional rendering working with shaders isn't particularly difficult compared to the fixed-function.
Are you serious? Well, you're entitled to your opinion, but I think it's been too long since you started out in graphics.

FFP and shaders are not comparable levels of effort, particularly for a newbie, even if what you're doing with shaders is completely trivial (e.g. make everything solid green).

As a newbie, you could 1) enable and configure features:


glEnable( GL_LIGHTING );
glLightfv( GL_LIGHT0, GL_AMBIENT, ambient );
glLightfv( GL_LIGHT0, GL_DIFFUSE, diffuse );
glLightfv( GL_LIGHT0, GL_POSITION, position );
glLightfv( GL_LIGHT0, GL_SPOT_DIRECTION, direction );
glLightf ( GL_LIGHT0, GL_SPOT_CUTOFF, cutoff );
glLightf ( GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0 );
glLightf ( GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.02 );
glLightf ( GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0 );

or, 2) go off and figure out how to implement the interface and the guts of the alternative on the GPU.

As a newbie, 1) is the level of abstraction you want. "Gimme a light so I can see my objects. I don't care how it works right now." As a newbie, you want something up quickly so you can validate assumptions, iteratively try things faster and see the result, and get that "hey, this is cool, I can do this" feeling. I get matrices now. I understand how I can use vertex colors now. So that's how normals and lighting work! So that's how I position my light source. etc.

Now you tell a newbie, "I'm sorry, you can't have any light sources until you know all about GPU architecture, shading languages, shader debugging [haha! Good luck!], and lighting equations, and can implement the required subset of those lighting equations, color material, fogging equations, etc. in shaders. Then you're worthy enough of a hacker to see a lit scene."

And as a newbie, their justified response is, "...Excuse me? That's pretty stupid, isn't it? This has all been implemented before, and I don't need anything fancy. [Obviously this camp isn't going to be very helpful. Maybe I should move on.]"

Or you can just say, feel free to use the built-in features, but when you get to where you want even better performance and/or more control, surprise!, you "can" replace all those built-in features and do your own thing!

You can view the fixed-function pipe as some dirty corner you shouldn't touch, or you can chose to view it as "GLU for shaders" (training wheels for newbies) to encourage more folks to learn 3D on OpenGL and continue to use it after that. I chose the latter.

Dark Photon
09-13-2009, 01:55 PM
...or you can chose to view it as "GLU for shaders" (training wheels for newbies) to encourage more folks to learn 3D on OpenGL and continue to use it after that. I chose the latter.
On that note ("GLU for shaders"), perhaps that's precisely what we need. Some add-on glu functionality that basically just gives users what was formerly built into the fixed function pipe for shader generation (vertex lights, color material, texgen, fog, etc.), but exposes the fact that you're binding and setting up shaders (e.g. you specify shader gen parameters, it generates shader programs, you bind shader programs, you set published uniform names advertised in the GLU docs instead of using say glLightfv to set light uniform parameters).

Once this GLU were standard (e.g. in Mesa), this stepping-stone would:

* preserve "the newbie connection" (users don't "have" to write shaders from the get-go, they just have to "use" them),
* get the Red Book and intro-to-OpenGL tutorials off the fixed-function pipe an onto shaders (so new users don't even learn the FFP calls),

Theoretically, this should allow the FFP capability in the core libGL library to be obsoleted (not soon but) sooner.

Alfonse Reinheart
09-13-2009, 03:00 PM
1) enable and configure features:

So... what do all of those things do?

In order to teach someone the fixed-function pipeline, you have to teach them about how vertices are processed. You have to teach them how colors are computed based on per-vertex normals, positions, colors, as well as the per-primitive lighting parameters. You have to show them a giant equation.

Or, you can show them this:



uniform mat4x4 transform;
uniform vec3 lightDir;
uniform vec4 lightColor;

in vec3 position;
in vec3 normal;
in vec4 color;

out vec3 outColor;

void main()
{
gl_Position = transform * position;

outColor = color * (dot(normal, lightDir) * lightColor);
}


This is self-documenting. By being able to even compile and link that shader, you know what its results will be. A programmer who understands programming enough to be able to write C++ programs at all can understand what this shader will do, at least to some degree.

Now, if all you're doing is just letting them screw around, saying "do this" without explaining what "this" means or does, then yes. Fixed-function is slightly easier to "do this" with than shaders. But only slightly.

I say slightly because simple shaders are easy to write. For example:



uniform mat4x4 transform;
in vec3 position;
in vec4 color;
out vec4 outColor;

void main()
{
gl_Position = transform * position;
outColor = color;
}


And if you're not teaching them how these work yet, it's no different from any other thing you're not yet teaching them.


As a newbie, you want something up quickly so you can validate assumptions, iteratively try things faster and see the result, and get that "hey, this is cool, I can do this" feeling. I get matrices now. I understand how I can use vertex colors now. So that's how normals and lighting work! So that's how I position my light source. etc.

The problem is that you're teaching them wrong. So that, when it comes time to learn how to do it properly, they have no idea what they're doing. They have to learn to do it one way, and then learn to do it again.

It's better to learn things the correct way the first time, even if it isn't as simple and obvious what you're doing.