OpenGL Distilled 96
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 Distilled | |
author | Paul Martz |
pages | 266 |
publisher | Addison-Wesley Publishing |
rating | 8/10 |
reviewer | Martin Ecker |
ISBN | 0-321-33679-8 |
summary | A concise introduction to the OpenGL graphics API |
Before going into more detail and reviewing the chapters of the book I have to disclose that I was a technical reviewer of the book before it was published.
"OpenGL Distilled" is aimed at people interested in learning the basics of OpenGL. The reader should already be familiar with programming in C++ and have a basic grasp of linear algebra, in particular vector and matrix algebra. Familiarity with other 3D graphics APIs, such as Direct3D, is an advantage, but not a necessity. The book does a good job of presenting only the fundamental aspects of OpenGL and 3D graphics programming in general and never overwhelms the reader with too much unnecessary detail. The author draws a good line between what to discuss and what is beyond the scope of the book. More advanced features of the API are only mentioned shortly with appropriate references to more in-depth literature. Some deprecated features, such as the feedback buffer, that are no longer commonly used are left out as well. In my opinion an unfortunate omission, is shader programming with the OpenGL Shading Language, which is only briefly mentioned in an appendix. A full chapter introducing the basics would be a nice addition to the book. Until then the reader is referred to the Orange Book, which discusses shader programming in OpenGL in detail.
One thing I highly appreciate about "OpenGL Distilled" is the introductory section of each chapter, which contains a "What You'll Learn" and a "What You Won't Learn" bullet list. This makes it clear what the chapter is about and - more importantly - what it is not about. Especially the latter is mostly missing in other books.
The book has a total of 8 chapters and 4 appendices. The first chapter explains what OpenGL is, talks a bit about setting up a development environment on the most common operating systems to actually develop OpenGL programs, and immediately gets your feet wet with a first simple example program. The chapter is concluded by a whirlwind tour through the almost 15-year history of OpenGL and its predecessors.
Chapter two focuses on drawing primitives, such as lines and triangles, and the various ways supported by OpenGL to specify vertex data. In particular, vertex arrays and vertex buffer objects (VBOs), a fairly recent addition to OpenGL to allow high-performance rendering, are the focus of this chapter. Additionally, a first overview of the OpenGL pipeline that a primitive passes through until it finally ends up in the framebuffer is presented. A more detailed discussion of this pipeline, in particular with regard to coordinate transformations, follows in chapter three. The various coordinate systems used in OpenGL programming, such as object, world, eye, and clip coordinates, are presented and discussed in detail in this chapter.
Now that we can render primitives we need to light them to make them look more interesting. Chapter four sheds some light on this by discussing the lighting and material model used in OpenGL's fixed-function pipeline. The best part of this chapter is the section titled "Debugging Lights", which gives some insights and helpful advice on how to debug OpenGL programs that use lighting. Many other books only describe the features of OpenGL lighting but do not explain common debugging techniques that can be applied when all you get is a black window instead of a nicely lit scene.
Chapter five is about pixel rectangles, in particular how to read from and write to the framebuffer. Some performance considerations are also discussed, which is a good thing since reading from the framebuffer is a costly operation. Again, this chapter concludes with a nice section on debugging techniques. The explanation of the raster position in this section is probably the easiest to understand that I have read to date.
Chapter six is a comprehensive chapter on 2-dimensional texture mapping that also discusses some more advanced applications of the technique, such as light maps and depth maps. Also using cube maps as environment maps is introduced. 1-dimensional and 3-dimensional texture mapping was omitted from the discussion.
Chapter seven deals with detecting the feature set of the OpenGL implementation, in particular, determining the version of the OpenGL specification the implementation adheres to and the available extensions. This chapter also discusses how to retrieve and use entry points for available extensions.
Finally, chapter eight deals with the platform-specific interfaces required to hook up an OpenGL program with the underlying operation system. These platform-specific interfaces are called GLX for Unix, WGL for Windows, and AGL for Mac.
The book has four appendices, which deal with a quick overview of advanced features, best practices, performance-related issues and debugging tips and tricks. Especially the latter two appendices on performance and debugging contain a lot of insights invaluable to programmers just starting out with OpenGL.
The book is printed in black and white throughout. Having some color plates in the book itself would have been a welcome addition considering that the topic is computer graphics. However, you can download some color plates from the books website at where you will also find the source code to the example programs in the book.
In conclusion, "OpenGL Distilled" is an excellent introduction to OpenGL, not only for someone new to 3D graphics programming but also for those that have worked with other 3D graphics APIs in the past that wish to get up to speed with OpenGL quickly. The book omits advanced and deprecated features that would unnecessarily overwhelm a beginner with OpenGL and is a good companion on the way to becoming an experienced OpenGL programmer.
The review author has been involved in real-time graphics programming for more than 10 years and works as a games developer for arcade games. In his rare spare time he works on a graphics-related open source project called XEngine http://xengine.sourceforge.net./
You can purchase OpenGL Distilled from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I like this book (Score:3, Informative)
Re: (Score:2, Offtopic)
Re: (Score:1)
Re: (Score:1, Offtopic)
Of course, I'll be modded as Troll for saying this, but anyone claiming they'll be modded as Troll is instantly
Re: (Score:2)
Ha! I saw through your clever ruse, I ain't gonna mod your post "insightful" 'cause that's what you want me to do... I'll mod you troll, 'cause I don't agree with you! Just as soon as I finish this message...
Aw, hell...
Re: (Score:2)
Must be the fanboys.
Re: (Score:2)
Re: (Score:1)
Re: (Score:3, Funny)
Re: (Score:1)
Re: (Score:2)
I agree it's easier to read things on paper than on screen, but I think that storage of hardcopies is not easier than on your computer. Even Windows Search works better than me trying to comb through a file cabinet. You m
Re: (Score:1)
You don't have to be the most organized person in the world when you file printouts in an inverse chronological order and mark the most important printouts. Folders are cheap, my office is roomy and we've got plenty o
Re: (Score:2)
You'd be better to keep a room full of DVD's and print on demand, given the sheer metrics of security, space, fire hazards,
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
I mean, they want to fill it with nuke waste; I'm sure that's bad for the life of a disc. If the radiation doesn't effect the dye layer, I'm pretty sure the heat would melt the plastic.
By the way, when did "Yucca Mountain" replace "Fort Knox" in the common vernacular?
Re: (Score:1)
Where oh where have my mod points gone? (Score:2)
I badly want them back so I can mod this whole thread OT.
Re: (Score:2)
Re: (Score:1)
OpenGL 2.0 library for Linux from ATI/AMD? (Score:1, Insightful)
I really don't know if this is idle speculation or there is some basis to it, but it is something interesting to consider. Perhaps
Re: (Score:2, Funny)
Re: (Score:1)
Re: (Score:1)
A reasonable overview of OpenGL (Score:5, Informative)
I'm reading this right now, and it is substantive and helpful. The downside is that it can get rather terse at times, without as much explanation as I felt was deserved. I suppose that's why they called it, "distilled". :)
Anyhow, the bulk of the book is not for the faint of heart. Be dialled when you read this, you're not getting any hand-holding.
It's interesting the review above was written by one of the technical reviewers of the book, the result being more of an overview than a pure objective review (with positives, negatives). Or maybe I'm asking too much.
hmmm... (Score:2)
Re: (Score:1)
Re: (Score:2, Interesting)
How ignorant, and blind, can a person be to make this statement? DirectX, is probably... why even try to explain how much crap DirectX is. You're definately a consumer. In the most negative sense of the word.
DirectX, will, and you mark my words, NEVER be of enough quality to be used in CGI REALISM. OpenGL can, generate very realistic renders... so realistic, it's used in all major film FX.
The reason why OpenGL games aren't as good looking, is
Re: (Score:3, Insightful)
Re: (Score:1)
Maybe the parent was thinking about StarFox for SNES?
Re: (Score:2)
No, we're not gaming. We're doing real work. (Score:5, Informative)
OpenGL likely powers the design tools that were used to develop many of the components in your computer, your vehicle, your cell phone, and your television. OpenGL is used by the simulation software your father's doctor uses to track the spread of your father's penile cancer. OpenGL is used in the process of locating the oil which becomes the gas you pour into your car.
OpenGL is used all around you. You're mostly just oblivious to it, since your world doesn't extend outside of Halo 2.
Re: (Score:3, Interesting)
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:2)
Vista has OpenGL support now, you just need Vista-compatible drivers. If you don't have compatible drivers it'll just turn off the glitzy desktop effects when using OpenGL apps, but presumably most graphics cards providers will just give you the new drivers.
It was a bit strange for a while though, yes.
Re:Hey guyz! Lets pretend anyone uses OpenGL! (Score:4, Insightful)
And obviously all serious visualization work isn't done in OpenGL.
Go back to your cave, troll.
Re: (Score:3, Funny)
Smell that? That's the sweet, pungent smell of GP's sarcasm.
Take it in, boy, take it in.
Re: (Score:2)
I hear the process for DirectX was more along the lines of MS asking what features card manufacturers wanted and then they were quickly put into practise. Often there was a reference rasterizer before hardware
Re: (Score:2)
Yeah. Completely unpopular. Please do me a favor and remove your lips from Mr. Ballmer's rear end long enough to post coherently when on Slashdot.
Re: (Score:3, Informative)
Re: (Score:3, Interesting)
Overall, the openGL interface is much simpler to optimize than directX. That is from my experience of both (althoguh I admit my experience of optimizing direct X is much less than that of openGL), in both cases batching is incredibly important,
picking (Score:2, Interesting)
Re:picking (Score:4, Interesting)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
GL on current linux distros [-1 Offtopic] (Score:2)
What's the deal with developing with OpenGL on linux at the moment? Last time I tried (2002 maybe?), there was something called Mesa, another thing called DRI or some such, another thing called GLX. It all got a bit confusing. I ended up using cygwin for a bit, then finding something else to do.
Is it the case now that I can just 'apt-get install opengl-devel' and have stuff just work?
Re: (Score:1)
Mesa is a open source linux OpenGL compatible library, you will find that other venders make Linux openGL compatible librarys like ATI. Example if you install the Official ATI linux video drivers you also get their version of openGL library along with it.
DRI (Direct Rendering Infrastructure) this open source video driver system allows direct access to the video card which in turn improves OpenGL pref
Re: (Score:2)
Of course, nVidia and ATi drivers provide their OWN OpenGL libs and headers, nVidia's implementation being a full-blown version 2.0, and it
That's odd (Score:4, Funny)
Win32? (Score:1)
Re: (Score:2, Insightful)
The platform-specific code you need to get an OpenGL app working on Windows is virtually identical to the code you need to get a Direct3D app working on Windows. It's a little more complicated, because Microsoft haven't updated it in well over a decade, but it's really quite simple to do if you know anything about Win32 programming. It's also a tiny little thing that you only have to
MOD PARENT UP (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
You'd be crazy not to perform some testing on all platforms. Small tweaks for each platform is a hell of a lot better than completely different code for each platform.
Re: (Score:1)
Yes, and you could also write your programs so they only work with a specific joystick and a specific soundcard only on computers made by IBM.
When you write a program, you should make sure it only works on the exact equipment you specify. Damn those stupid lusers for wanting anything else!
Re: (Score:2, Insightful)
What sort of support will DirectX win your apps? I develop with OpenGL and with DirectX (my renderer has a backend for both), and I get about the same amount and quality of support for both APIs.
My preference is DirectX, but that's just a matter of taste. Like I said, OGL and DX both draw triangles pretty well.
Stereoscopic OpenGL (Score:2)
BTW, for anyone reading this -- does anyone know how to get Google Earth to do stereoscopic 3D?
Re: (Score:2)
Flick them in even/odd to left/right respectively, sending the 'change' signal to your LCD glasses on each frame.
Render them simultaneously to a pair of framebuffers. Combine the left:red channel and the right:blue/green channels to the screen. Put on your 50's 3d movie glasses.
Render half-screens, right and left swapped, and cross your eyes.
Render half-screens,
Re: (Score:1)
Re: (Score:1)
Buy this book! Support Paul! (Score:4, Interesting)
In all seriousness, this is an excellent book. Paul wrote this book to fill a serious need -- an updated, quality OpenGL book for this age. So much of what is in the canonical texts is no longer important (geometry by Begin/End), and they won't cover the new recommended practices (VBOs, Vertex Arrays, etc).
On a personal level, Paul is one of the most generous and helpful programmers I know. I owe him lots of beer for all the advice he has provided. He also participates in the open source OpenScenGraph project:
http://openscenegraph.org/ [openscenegraph.org]
a high-performance 3D toolkit for Windows, Mac and Unix/Linux, used in hundreds of open source and commercial simulator, game and 3D visualization projects (including my company's NatureView Express tool http://3dnature.com/nv.html [3dnature.com] -- plug plug!)
Re: (Score:1)