Forgot your password?
typodupeerror
Book Reviews Books Media

OpenGL SuperBible 115

Posted by samzenpus
from the draw-it-better dept.
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.
OpenGL SuperBible (Fourth Edition)
author Richard S. Wright, Jr., Benjamin Lipchak, Nicholas Haemel
pages 1205
publisher Addison-Wesley
rating 9/10
reviewer Martin Ecker
ISBN 0321498828
summary A solid introduction to OpenGL programming that focuses on both the old-style fixed-function pipeline and new-style shaders.


The OpenGL SuperBible, is split into three parts, appropriately called the old testament, the new testament, and the apocrypha. Arguably, appendix C, an OpenGL API reference with more than 350 pages, could be considered a fourth part even though it isn't listed as such in the table of contents.

The old testament provides an introduction to both OpenGL programming with the fixed-function pipeline and to the basics of 3D graphics programming. The new testament then moves on to describe how shaders, small programs that run on the GPU (Graphics Processing Unit), allow us to use the programmable features of today's powerful graphics cards. It also contains information on recent advancements of the OpenGL API, such as floating-point textures, pixel buffer objects and framebuffer objects. The apocrypha closes the book with a discussion of how to interface OpenGL with the underlying operating system.

The first part of the book — the old testament — consists of 14 chapters with around 500 pages total. The first chapter gives a general overview of 3D graphics and the various effects that the remaining chapters in this part of the book are going to show how to implement with OpenGL. The writing style is very casual and easy to follow. Especially in these first chapters, the book is very light on mathematics, but does explain some of the basics, such as coordinate systems, some simple vector algebra, and matrices. The second chapter introduces OpenGL and immediately presents a few simple sample programs to wet the reader's appetite. The programs are analyzed in detail with explanations to nearly all lines of code. It should be easy for a beginner to follow and understand the code.

The next few chapters gradually introduce more and more OpenGL API functions intermixed with new 3D graphics concepts, such as rendering points, lines, and polygons in various ways, how to use geometric transformations and projections, and how to use the fixed-function pipeline to render lit objects with simple projective shadows. Eventually, texture mapping is introduced with pretty much everything you need to know about the topic. In particular, multitexturing, the various filtering modes — even anisotropic filtering, texture compression, and using textures with point sprites are discussed. The book continues with an overview of curves and surfaces as supported by the OpenGL Utility library (GLU, for short). The book dates itself a bit here, since this is a software-only, and thus fairly low-performance feature that is rarely ever used in professional software. The same applies to the discussion of feedback and selection, which are not implemented on current graphics hardware and therefore not widely used. After this short excursion down the OpenGL memory lane the book moves on to the fairly recent addition of occlusion queries. Occlusion queries are used to detect complex, occluded objects in the rendered scene, so that they need not be rendered. Most modern-day graphics software that renders dense scenes with a lot of overdraw, such as video games, uses this feature. The old testament closes with a chapter on depth textures, which are prominently applied to render real-time shadow effects.

After laying a solid foundation for 3D graphics programming with OpenGL in the first part, the second part of the book — the new testament — deals with the new era of graphics programming that started a few years ago when the first programmable graphics card came into the market. This part consists of 4 chapters with about 100 pages. The first chapter provides an overview of the programmable pipeline and explains which features of the fixed-function were replaced by shaders. This introduction is followed by a sample program that gives a first glimpse of GLSL, the OpenGL shading language, in which shaders are written. The next chapter is all about vertex shaders and how to implement simple lighting models, fog, and vertex transformations using them. The third chapter is about fragment shading with some interesting post-processing and procedural texture mapping shaders. The final chapter of this part of the book discusses advanced buffers, such as floating-point textures and color buffers, and pixel buffer and framebuffer objects — all recent additions to OpenGL that allow to achieve various effects, such as rendering directly to a texture or creating vertex data on the GPU.

The final part of the book — the apocrypha — consists of 4 chapters explaining how to integrate OpenGL with the underlying operating system, in particular with Windows, Mac OS X, and Linux plus various other Unix flavors. The last chapter of this part of the book is about OpenGL ES, which is a version of OpenGL designed to be used especially on embedded system devices, in particular mobile phones and PDAs, to render real-time, interactive 3D graphics.

The book has a lot of images and diagrams throughout, though unfortunately not all of them are in color. There are however 32 color plates of the most interesting images in the middle of the book. The complete source code of the book, and even precompiled binaries for Windows and Mac OS X, can be downloaded from the book's webpage.

If you are new to both 3D graphics programming and OpenGL with a bit of C/C++ programming experience and you are eager to learn how to develop interactive programs with OpenGL, then this book is exactly right for you. The book is written in an easy to understand style without skimming the details. It is the most comprehensive introduction to OpenGL that doesn't require a lot of previous knowledge I have seen to date. If you already have experience with another graphics API or are well-versed in 3D graphics in general, but want to familiarize yourself with OpenGL, you might also want to consider the OpenGL Programming Guide, also known as the Red Book.

All in all, the OpenGL SuperBible succeeds fairly well in keeping its promise to be the best introduction to OpenGL and 3D graphics programming. Even after you're done working your way through the main parts of the book you will always come back to the handy OpenGL API reference in the appendix of the book.

I have been involved in real-time graphics programming for more than 10 years and work as a professional game developer for High Moon Studios in sunny California.


You can purchase OpenGL SuperBible Fourth Edition from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

OpenGL SuperBible

Comments Filter:
  • SuperJesus? (Score:5, Funny)

    by p0tat03 (985078) on Wednesday August 08, 2007 @02:40PM (#20160345)

    Damn, the first thing I thought when I read the title was "Does it come with SuperJesus?"

    • by njchick (611256) on Wednesday August 08, 2007 @02:43PM (#20160411) Journal
      Yes, and he gets crucified on a 3D-SuperCross.
    • by ArcherB (796902) *
      Damn, the first thing I thought when I read the title was "Does it come with SuperJesus?"

      I thought something similar and wondered, why would someone want to 3D'ify The SWORD Project [crosswire.org]? What good is a 3D Bible over plain text? Do the letters float or something?

      Imagine my surprise when I read

      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."

      When did God get into OpenGL?

    • 1205 pages? In one book? Have any of the people involved actually tried using the book? As in carrying it around, flipping form chapter to chapter? This is ridiculous... this is exactly the point of multiple volumes.... physical ease of use! It's a book I'd actually like to have but not if it means it's like carrying a boat anchor around.
    • http://en.wiktionary.org/wiki/bible [wiktionary.org]

      Noun

      Singular
      bible

      Plural
      bibles

      bible (plural bibles)

            1. A comprehensive manual that describes something. (e.g., handyman's bible).
            2. (nautical) A holystone.

      • wait, what? (Score:3, Interesting)

        by dreddnott (555950)
        Excuse me, but the title and summary clearly mentioned a SuperBible, not a Superbible.

        The capitalisation of Bible clearly references the proper noun:

        http://en.wiktionary.org/wiki/Bible [wiktionary.org]

        Proper noun

        1. The Christian holy book.
        2. The Jewish holy book that was largely incorporated into the Christian Bible.
        3. The analogous holy book of another religion.
        4. A specific versio
        • The OpenGL SuperBible falls under the following definition:

          3. The analogous holy book of another religion.


          That religion is the worship of 3D visual goodness, and programming in general.

          Ohm addme padme hum - keep the foo counters turning.
  • According to the authors it 'strives to provide the world's best introduction to not only OpenGL, but 3D graphics programming in general.'


    Don't you mean "according to the publisher"? You need some kind of marketing background to write that sort of bloated statement. A real tech writer wouldn't try to oversell himself like that.
    • by Svartalf (2997)
      I wouldn't put it past Benj (Yes, Benj...) to put something like that in there as a joke.
    • by KDan (90353)
      You seem to assume that being a technical author means having no marketing skills. Actually, you'll be interested to find out that being a published author (in any subject) tends to involve plenty of marketing skills - to sell yourself, your book, its potential earnings, etc.

      Daniel
    • I don't think there's anything bloated about that statement. The "world's best" is the only thing that sounds like marketing, but we're also talking about the 4th edition of a well-established and popular book that can make that sort of claim.
  • Could someone summarize in 3 words or less?
  • by Anonymous Coward on Wednesday August 08, 2007 @02:42PM (#20160371)
    ...would come in the pop-up format. I don't think any have yet to qualify.
    • or at least make you think it's popping up.
    • by radarsat1 (786772)
      .. or the entire book should be done in Stereograms!

      "Everyone sees this thing except me. Today's my day. I brought a
      lunch and a soda.

      I'm not gonna leave until I see this sailboat everyone keeps
      talking about. "
    • Re: (Score:1, Funny)

      by Anonymous Coward
      I'm on IE5 you insenitive clod! I don't need MORE pop-ups!
  • Blasphemy (Score:3, Funny)

    by Anonymous Coward on Wednesday August 08, 2007 @02:42PM (#20160395)
    This is not a real bible. you holy open source rollers need to stop naming things 'bibles'. Thanks!
    • Re: (Score:2, Funny)

      by njchick (611256)
      OpenGL [wikipedia.org] is not a real open-source. You holy religion rollers need to stop naming non-free specifications 'open source'. Thanks!
      • Re: (Score:3, Informative)

        SGI's implementation isn't "Open Source", but the specification is.
      • Its open to a select few. Im sure if you were friends of those few with access to the source, you would be able to modify it.

        Its more open then DirectX.

        Open source is a set of principles and practices that promote access to the design and production of goods and knowledge. The term is most commonly applied to the source code of software that is available to the general public with relaxed or non-existent intellectual property restrictions. This allows users to create software content through incremental individual effort or through collaboration. http://en.wikipedia.org/wiki/Open_source [wikipedia.org]

        It fits the bill for wiki's open source definition, and my own personal open source definition. Its "relaxed" intellectual property restrictions are what make it fit the bill for me.

        • by stinerman (812158)

          Its open to a select few.
          Actually, it's open to anyone. Mesa [mesa3d.org] is an FOSS implementation of OpenGL licensed under the MIT license. Addons are licensed under some non-free licenses.
          • Aye I remember nvidia usto have their own "MesaGL" libs, that had to replace the standard mesa libs on Redhat and others. There is a clear distinction between FOSS or FLOSS and Open Source.
    • O BIBLIO means The Book
  • So close... (Score:5, Funny)

    by stinerman (812158) <nathan.stine@NOSpaM.gmail.com> on Wednesday August 08, 2007 @02:46PM (#20160463) Homepage
    Who else was expecting a Holy Bible implemented in OpenGL? I can see the conversation now:

    1: Hey, did you see SuperBible? This thing rocks.
    2: SuperBible, wtf?
    1: It's God's word in full 3D. You can rotate the book on all 3 axes, flip pages, and it even has full scene rendering during the great flood.
    2: That's ridiculous. Who would want that?
    1: Bah, at the very least you can use it as a benchmarking program. I'm getting 200FPS at the Sermon on the Mount.
    • by Shadow Wrought (586631) * <shadow.wroughtNO@SPAMgmail.com> on Wednesday August 08, 2007 @03:12PM (#20160849) Homepage Journal
      I'm getting 200FPS at the Sermon on the Mount.

      The cool part is when they download 10 GB of loaves and fishes over a dialup connection in less than 30 seconds.

      • by maxwell demon (590494) on Wednesday August 08, 2007 @03:27PM (#20161073) Journal
        Don't forget the part about installing malware on Egyptian computers. Some highlights are turning the screen dark, introducing lots of new bugs, and killing all first-forked child processes.
      • That's easy using the UltraJesus algorithm (otherwise known as run length encoding). Here's the file:

        fishes 1000000
        loaves 1000000

        And here's the UltraJesus2000 decompressor:
        awk '{for(i=0; i < $2; i++)print $1}'

        Warning the copyright on this will expire 90 years after the original author's death. In this case, that will be a very long time.
      • The cool part is when they download 10 GB of loaves and fishes over a dialup connection in less than 30 seconds.
        ... and fed the 5,000,000,000 polygons. There were enough mipmaps for everyone. I also like the bit when the dead are raised and anti-aliased with anisotropic filtering. (But that comes late in the book).
    • by faloi (738831)
      1: Bah, at the very least you can use it as a benchmarking program. I'm getting 200FPS at the Sermon on the Mount.

      A true test is rendering the raining frogs. The Sermon on the Mount had too many static items to be impressive.
    • by E++99 (880734)

      Who else was expecting a Holy Bible implemented in OpenGL?

      *raises hand*

      I was getting psyched. Plus the implications of the new direction for /. were mindblowing. I guess it's world-shattering enough that /. published my submission of the puke saber [slashdot.org] the other day, which is a story on Fox News, which I found on the Drudge Report.

    • Yeah, but the concept of the trinity [wikipedia.org] is causing my CPU to grind! :)
    • Re: (Score:1, Funny)

      by Anonymous Coward
      In the beggining, God created a surface.
  • Does it tell us that SGI created OpenGL, or does it tell us that OpenGL evolved from the primordial ooze that is Microsoft?

    Sorry, I just couldn't resist. . .
    • by danbert8 (1024253)
      Of course, the superbible starts with "In the beginning, there was only darkness."
      • by Bluesman (104513) on Wednesday August 08, 2007 @03:13PM (#20160855) Homepage
        1:1 And ye, the programmers said, "Let there be text" and there was text. 1:2 And the programmers looked at the text, and saw that it was good. 1:3 On the third day, the programmers said, "Let there be pictures, too, text is boring," and there were pictures too. 1:4 And the programmers looked unto the pictures, and saw that they were good, but pixelated and difficult to animate.

        1:5 So then the programmers said, "Let there be anti-aliasing and matrix transformations and hardware support for rendering like the Amiga has," and lo, all of these things came to be on the fourth day. 1:6 And the programmers looked unto all of their creations and gave OpenGL dominion over all hardware accelerated graphics, and on the fifth day they rested.

        2:1 But lo, the serpent Microsoft saw OpenGL and said unto him, "You are good, but you could be greater, if you only would listen to me." 2:2 And the serpent took one of OpenGL's ribs and copied OpenGL, and made DirectX. 2:3 And when the programmers looked at what had become of OpenGL, they were angry, and tossed the serpent and DirectX out of the Garden.

    • by vertinox (846076) on Wednesday August 08, 2007 @03:21PM (#20160971)
      Does it tell us that SGI created OpenGL, or does it tell us that OpenGL evolved from the primordial ooze that is Microsoft?

      I'm a firm believer that OpenGL was created by intelligent design.

      But with DirectX, I'm not so sure.
  • by Sebastopol (189276) on Wednesday August 08, 2007 @02:59PM (#20160647) Homepage

    Duke: This turn of events came after Vatican scientists announced today, that the devil is not the greatest threat to salvation. Due to last weeks discovery of the Super Devil. Religion reporter Dallas Houston has the story.

    Dallas: Thanks Duke, well let me try and get you a clear picture of what we're dealing with here. Here's a photo of the devil, and here's the super devil. Now as you can see, there are some significant differences. The super devil is at least six inches taller, uh, he has a flying motorcycle, and a jar of marmalade that we believe forces you to commit adultery.
  • Oddly enough.... (Score:5, Interesting)

    by kazade84 (1078337) on Wednesday August 08, 2007 @03:03PM (#20160707)
    I bought this book just a few days ago. I have studied OpenGL for years, but never got round to buying it. It is a fantastic reference book, and I keep stumbling across things that I didn't know about OpenGL... unfortunately it's all about to become redundant.

    The OpenGL "Longs Peak" specification is due to be announced in the next few days, it is the first API revamp to break backwards compatibility and pretty much the whole API is going to change, making my lovely new reference book a bit dated. However, the reason I still bought it is because the same concepts can be carried over to the new API pretty easily and I would say 70% of the book will still be relevant to some extend.
    • by 0racle (667029)
      At the rate standards become used, that book will last you a long time.
    • They may announce it soon, but its gonna take awhile for all the support bits to catch up I expect.
      Also, as I understood it, youll be able to mix 2.1 with longs peak if you wish.
    • by aztektum (170569)
      Unless you know of a magical wand that someone will wave which converts all the OpenGL code out there to the new spec, I'd think this book will be 100% relevant for a while.
  • by CaptainPatent (1087643) on Wednesday August 08, 2007 @03:03PM (#20160721) Journal

    The old testament provides an introduction to both OpenGL programming with the fixed-function pipeline and to the basics of 3D graphics programming.
    Here's a reading from the book of SGI from the old testiment:

    In the beginning SGI created a 640x480 palate
    And the palate was without form, and void; and darkness was upon the face
    And SGI said, Let there be light: and there was light
    And SGI saw the light, that it was good: and SGI divided the light from the darkness.
    And SGI called the light glEnable (GL_LIGHTING);


    Man, they do a good job of telling how OpenGL was created!
    • Re: (Score:2, Insightful)

      by maxwell demon (590494)
      And the LORD SGI commanded the man, "You are free to use any API on your computer; but you must not use the API of DirectX, for when you use it you will surely die."
      • And the LORD SGI commanded the man, "You are free to use any API on your computer; but you must not use the API of DirectX, for when you use it you will surely die."

        It's better just to encourage the Hittites to write to DirectX so that you can enjoy your leisure time while the Hittites have to keep re-writing their game API's every couple years.
    • And SGI wondered why there was no light, and realised he needed to glEnable(GL_LIGHT0)

      Regards
      elFarto
  • excerpt (Score:5, Funny)

    by Jeek Elemental (976426) on Wednesday August 08, 2007 @03:03PM (#20160723)
    "glBegin begat glColor begat glTranslate begat..."
  • I'm all for new and interesting ways to teach a subject, but this book is a disaster waiting to happen! The last time I heard 3D and the Bible uttered in the same breath was when this piece of shit [wikipedia.org] was released.

    Please consider the consequences!
  • If it's all inclusive, call it the OpenGL Encyclopedia or something. The bible cliche is as old, worn out, and overused as SOHO.
    • by weak* (1137369)

      The bible cliche is as old, worn out, and overused as SoCo.
      Typo corrected. Admitting it's overused is the first of twelve steps. Stay strong--maybe Superjesus can help with that.
    • by bensch128 (563853)
      I liked it when the ogl reference was "my little red book". :)

      ben
  • First Version (Score:3, Interesting)

    by PhotonSphere (193108) on Wednesday August 08, 2007 @03:17PM (#20160935) Homepage Journal
    I did a double take on the book's title when I saw this, as I have that exact same title in my library at a little over arm's reach. As it was printed in 1996 and doesn't make any mention of an edition number, I'm guessing that it must be the first edition. It speaks well of a (non-collegiate) technical book to have been around a decade. (I'm also relieved that /. isn't quite as behind as I thought at first glance...)

  • Fat? (Score:1, Flamebait)

    by drooling-dog (189103)
    So, as a "superbible" is it another one of these 5 kg books that artificially bloats the page count with lots of whitespace, needless screenshots, and big section headings every other paragraph, to make you feel like you're getting more for your money?

    Then, no thanks...
    • by quasius (1075773)
      No. There's just a lot of useful information and helpful examples. And yes there are some screenshots, but those happen to often be helpful when dealing with something as visual as OpenGL.
    • by Threni (635302)
      > So, as a "superbible" is it another one of these 5 kg books that artificially bloats the page count with lots of whitespace, needless screenshots,
      > and big section headings every other paragraph, to make you feel like you're getting more for your money?

      Hey, don't forget the CD with `enhanced content` such as extra chapters which `weren't ready for the book at publication time`!

  • by quasius (1075773) on Wednesday August 08, 2007 @04:18PM (#20161793)
    I used the 3rd addition of this book to learn OpenGL and 3D programming is general. I had no prior 3D coding experience (although I've always done well with geometry and spacial reasoning) and felt the book did a great job of getting me started without feeling dumbed down. And it continues to be a fine reference 2 years later now that my job involves 3D game engine work. After I cut my teeth on the book, I ended up taking a class from Richard S. Wright, Jr (author) and the guy knows his stuff and was an effective teacher. (So rare sometimes...) I haven't seen the fourth edition, but he was talking about its writing during the class and I'd be surprised if it's not excellent. This is a great book for beginners and beoynd. It does assume that you are proficient in C++ and can do math, but doesn't flood you with information you really don't need.
  • Is there a comparable equivalent for DirectX? I've been looking for an up-to-date one (Direct3D 9 and 10, all the shader models, etc) to add to my library to learn more about graphics programming, shaders, and the fixed-function pipeline.
  • is coming out when? It will be just like the bible but with 6 different fonts, lots of screenshots, and weighing in at around 9,000 pages.
  • by BritneySP2 (870776)
    I have been somewhat bothered by the statement that, in one form or another, is usually made on the first pages of any text on OpenGL:

    OpenGL is an interface with the 3-D hardware

    1) Isn't OpenGL just an API? If so, then the implementation (whether it is hardware-based or not) is irrelevant.

    2) How good is OpenGL for 2-D graphics? Judging, e. g., by what Compiz/Beryl do, it can be successfully used as a base for development of a 2-D user interface as well.

    • Re: (Score:2, Informative)

      by quasius (1075773)
      1) It's both an interface to the 3-D hardware and an API. API = Application Programmers *Interface.* 2) OpenGL works just fine for 2-D. Just switch to an ortho projection and start drawing things.
      • Sorry about the confusion: I was not talking about "interface vs. API"; what I was talking about was "(just) API vs. hardware API".
    • by HeroreV (869368)
      I've heard talk for years about dropping the 2D stuff from video cards and APIs, but there doesn't really seem to be a push to drop it. Supposedly there's no reason to have separate 2D stuff besides backwards compatibility.
  • The complete source code of the book, and even precompiled binaries for Windows and Mac OS X, can be downloaded from the book's webpage.

    All I see on that page is some sample code from examples contained in the book. I was kind of hoping for the actual source code for the book, preferably in LaTeX form.

  • If opengl's selection and feedback features are not used anymore, then how does the programmer implement object selection in modern gl? Magic?

    Ben

An optimist believes we live in the best world possible; a pessimist fears this is true.

Working...