Slashdot Log In
OpenGL Programming Guide
Posted by
timothy
on Fri Sep 02, 2005 02:41 PM
from the robotic-pleasure dept.
from the robotic-pleasure dept.
Martin Ecker writes "The Red Book, also known as the OpenGL Programming Guide, is back in its fifth edition. It received the name Red Book because of the nice red book cover, and possibly also because it has remained the standard introductory text on the OpenGL graphics API for years, and always referring to it as "OpenGL Programming Guide" is too long. This fifth edition now also covers new features introduced with versions 1.5 and 2.0 of the OpenGL standard. So let me take you on a tour through the pages of this book to see what it has to offer." Ecker's review continues below.
| OpenGL Programming Guide (5th Ed.) - The Official Guide to Learning OpenGL, Version 2 | |
| author | Dave Shreiner, Mason Woo, Jackie Neider, Tom Davis |
| pages | 838 |
| publisher | Addison-Wesley Publishing |
| rating | 8 |
| reviewer | Martin Ecker |
| ISBN | 0321335732 |
| summary | A very complete and thorough introduction to OpenGL |
I should mention that the last edition I read of the Red Book was the first edition, and a lot of material has been added to the book in the meantime. Just as the first edition, however, the fifth edition is still incredibly complete and thorough. It contains explanations of pretty much every feature of OpenGL, even the rarely used ones. You want to know about the new occlusion queries added to OpenGL recently? It's in this book. You want to know about the accumulation buffer and its uses? It's in this book. You want to know about the (mostly deprecated) use of indexed color buffers? It's in this book. The only thing the book does not cover in detail is vertex and fragment shaders because they have their own book, the Orange Book (aka The OpenGL Shading Language) -- see my previous Slashdot review.
The Red Book is aimed at the beginning to intermediate graphics programmer who is not yet familiar with OpenGL. It assumes a basic background in computer graphics theory and working knowledge of the C programming language. The book consists of 15 chapters and 9 appendices that together span approximately 800 pages.
The first chapter gives a brief introduction to the basic concepts of OpenGL and describes the rendering pipeline model used in the API. GLUT, a cross-platform library that allows easily creating OpenGL applications, is also shortly discussed together with a program that shows GLUT in action. The following chapters proceed to explain the basic geometric primitives, such as lines and polygons, supported by OpenGL and how to render them in different positions and from different viewpoints using the various OpenGL matrix stacks. The authors also discuss here the basics of using colors, fixed-function lighting, framebuffer blending, and fog.
Chapter seven contains a description of display lists, a unique feature of OpenGL that allows to store OpenGL API calls for efficient multiple use later on in a program. Chapter eight then moves on to discuss what an image is for OpenGL, which brings us straight to chapter nine on texture mapping, one of the largest chapters in the book. This chapter discusses everything you need to know on textures, from specifying texture images in uncompressed and compressed form to applying textures to primitives using the various kinds of supported texture filters. Also depth textures and their application as shadow maps are presented.
In chapter ten the authors discuss the buffers that make up the framebuffer, such as the color buffer, depth buffer, and stencil buffer. This chapter summarizes some of the things already presented in the earlier chapters and then describes the various framebuffer operations in more detail. Also the accumulation buffer and its uses, such as motion blur and depth of field effects, are discussed. Chapter eleven and twelve are on the tools provided by GLU, the GL utility library, in particular tesselators, quadrics, evaluators, and NURBs. GLU is nowadays rarely ever used in production code, so these chapters mostly demonstrate just how complete the Red Book is in its coverage of OpenGL. This also applies to chapter thirteen on selection and feedback, which are rarely used features, mostly because of the lack of hardware acceleration.
Finally, chapter fourteen is a collection of topics that didn't fit into the other chapters, such as error handling and the OpenGL extension mechanism. Additionally, this chapter presents various higher level techniques and tricks, for example how to implement a simple fade effect, how to render antialiased text, and some examples of using the stencil buffer. The final chapter of the book - newly added in the fifth addition -- is a short introduction to the OpenGL Shading Language (GLSL, for short). Even though the OpenGL API functions required to use GLSL are presented, this is only a quick overview of how programmable shaders are used in OpenGL. For a more detailed description of GLSL the reader is referred to the Orange Book.
The book closes with quite a few appendices on the order of operations in the OpenGL rendering pipeline, the state variables that can be queried, the interaction of OpenGL with the operating system-specific windowing systems, a brief discussion of homogeneous coordinates as used in OpenGL, and some programming tips. Also a reference of the built-in GLSL variables and functions is included, which is a bit odd considering that the Red Book actually doesn't really concentrate on programmable shaders or GLSL. It's a good reference nevertheless.
The book contains a large number of images and diagrams, all of them in black and white except for 32 color plates in the middle of the book. The illustrations are of high quality and generally help make the explained concepts and techniques easier to understand. Most of the color plates depict spheres, teapots, and other simple geometric objects, so they aren't overly eye-catching but do serve their purpose of showing what can be achieved with OpenGL.
The Red Book remains the definitive guide to learning OpenGL. Whenever someone asks me "What book should I read first to learn OpenGL?" this is the book I refer them to. Apart from being a good introduction, it also contains many interesting tips and tricks that make the experienced OpenGL programmer come back to it often. If you've read through this book in its entirety you pretty much know everything there is to know about OpenGL.
Martin Ecker has been involved in real-time graphics programming for more than 9 years and works as a games developer for casual arcade games. In his rare spare time he works on a graphics-related open source project called XEngine. You can purchase OpenGL Programming Guide (5th Ed.) - The Official Guide to Learning OpenGL, Version 2 from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Related Stories
[+]
OpenGL Distilled 96 comments
Martin Ecker writes "Until now, if you were looking for an introduction to the OpenGL graphics API, the "OpenGL Programming Guide" (also known as the Red Book) was your best bet. Now Addison Wesley Publishing provides a new alternative that is easier to digest than the all-encompassing Red Book with its more than 800 pages. Paul Martz's "OpenGL Distilled" concentrates on discussing only the important fundamentals you need to program 3D graphics using OpenGL 2.0 and provides a concise introduction to the most important cross-platform graphics API currently available." Read the rest of Martin's review.
[+]
OpenGL SuperBible 115 comments
Martin Ecker writes "The OpenGL SuperBible, in its vastly expanded fourth edition, is the latest addition to the Addison-Wesley Professional OpenGL series. According to the authors it 'strives to provide the world's best introduction to not only OpenGL, but 3D graphics programming in general.' A tough goal to achieve." Read the rest of Martin's review to see if the book keeps its promise.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Microsoft (Score:1, Informative)
Re:Microsoft (Score:5, Informative)
What about this site? (Score:5, Interesting)
(http://www.irtza.com/)
Re:What about this site? (Score:5, Informative)
Try before you buy... (Score:5, Informative)
http://fly.cc.fer.hr/~unreal/theredbook/ [cc.fer.hr]
This is an older version, but still a very good grounding in the basics of interactive 3d graphics.
Re:Try before you buy... (Score:4, Informative)
http://opengl.org/documentation/red_book_1.0/ [opengl.org]
Don't know if the fifth is online yet.
The Red Book is not the Blue Book (Score:5, Informative)
http://www.opengl.org/documentation/blue_book_1.0
Figures (Score:3, Funny)
Free version (Score:5, Informative)
Did I miss something (Score:2)
(http://mnewberg.com/)
games (Score:3, Funny)
That's not the red book! (Score:5, Funny)
Also, hacking looks a lot like a bad screensaver. There's never any text editing or commandlines involved.
Re:That's not the red book! (Score:5, Informative)
(http://www.trifocus.net/)
Save Some 1.57%! (Score:1, Informative)
You would think... (Score:2, Insightful)
You would think, wouldn't you, that it would contain explanations of every feature of OpenGL? After all, if it's not in the book, should it be in the language?
Hard cover? (Score:3)
The real "Red Book" (Score:1)
Covers & Colors (Score:5, Informative)
The full set are as follows:
Red Book - Programming guide - chatty description which still has all of the arguments of all of the functions described within it. You *need* this book...expect to buy a new one every couple of years as the API evolves. Keep one copy at work and the last generation one at home...maybe keep the one before that in your car!
Blue Book - Reference Manual - quite literally a set of 'man' pages printed out and bound together in a book. Useful if you like to read books instead of screens.
Green Book - GLUT. Covers the GL Utility Toolkit. This is really rather unnecessary.
Alpha Book - OpenGL programming for Windows. (It actually has a white cover...but since we had the RGB books, we needed Alpha to complete the set!)
Orange Book - OpenGL shader language (GLSL). If you want to program at the cutting edge of realtime graphics, you'll be using shaders. It's written in a style broadly similar to the way the Red Book is written and is very readable.
Finally, there is the OpenGL specification document. This has (AFAIK) never been put into print (which is a great shame - I'd buy it) - you can download it from www.opengl.org and it contains VERY detailed documentation of every function that goes far beyond any of the printed manuals - but which presumes you already know OpenGL pretty well. However, if you need to know the mathematical description of how OpenGL implementations are supposed to calculate the level of detail of your texture map...this is where you'll find that.
Whilst all the other books are handy to have around, the RedBook is utterly essential to OpenGL programmers (even those of us who've been using it for the whole eleven years of it's life will find themselves referring to it often enough to warrant owning a copy). The nice thing about it is that it's very readable. You can open it at page 1 knowing nothing - and read through to the end and wind up having learned all of OpenGL - or you can pretend it's a set of man pages and use the (excellent) index to find a simple description of every function and it's arguments that's *NEARLY* as good as the Blue Book.
Too Bad OpenGL Is Getting Crippled (Score:1, Troll)
(http://slashdot.org/)
Re:Too Bad OpenGL Is Getting Crippled (Score:5, Informative)
(http://www.patchsteger.com/)
What the heck? (Score:2)
(Last Journal: Tuesday July 05 2005, @11:51PM)
I know - bad joke, but I just HAD to say it. The little elves in my head whisper evil things.
The "Red Book" huh ? (Score:1)
Or is that Aussies used car prices
stop calling it the Red Book. (Score:1)
http://www.cs.wisc.edu/~ghost/doc/book s.htm
I did the cover for the Red Book (Score:3, Interesting)
(http://www.hammerhead.com/ | Last Journal: Tuesday November 13, @02:54AM)
Anyway, if you're wondering, the idea of the globe is that you can make the whole world out of little tiny pieces -- which seems like OpenGL to me. OpenGL is a great library, beautifully orthogonal, simple, and consistent, just the right thing for building 3D applications.
And, btw, I think that the Google logo looks a whole lot like the OpenGL on the table in the book cover, but...hey, whatever.
Thad Beier
Red Book == Postscript (Score:3, Insightful)
(http://slashdot.org/)
What gives?
New Red Book is Disappointing (Score:1)
I had such high expectations of the next Red Book. I was hoping for a more modern approach to OpenGL. What a shame.
I'll wait for the next edition of the orange book
Dragon Book (Score:1)
I thought the Red Book... (Score:2)
(http://www.dognoodle99.cjb.net/ | Last Journal: Saturday April 16 2005, @10:50PM)
Have they stopped the false advertising? (Score:2)
As you may guess, I was (and still am) quite pissed off by this false advertising, in the newsgroup an author said it was a mistake, a pretty big mistake if you ask me! Have they fixed this "mistake"?
Newer the better!! (Score:1)
(http://www.usagestatistic.com/ | Last Journal: Monday September 05 2005, @01:15PM)
Re:RIght on time (Score:2, Funny)
Re:Obsolete? (Score:1)
(http://oscar.hnetinc.com/)
Re:Slightly Offtopic (Score:1)