#440 in Computers & technology books

Reddit mentions of OpenGL SuperBible: Comprehensive Tutorial and Reference

Sentiment score: 6
Reddit mentions: 12

We found 12 Reddit mentions of OpenGL SuperBible: Comprehensive Tutorial and Reference. Here are the top ones.

OpenGL SuperBible: Comprehensive Tutorial and Reference
Buying options
View on Amazon.com
or
    Features:
  • Used Book in Good Condition
Specs:
Height9 Inches
Length7 Inches
Number of items1
Weight3.5714886444 Pounds
Width2 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 12 comments on OpenGL SuperBible: Comprehensive Tutorial and Reference:

u/H3g3m0n · 22 pointsr/learnprogramming

Recently OpenGL has been updated and unfortunately the non-shader stuff is now all deprecated which will be quite a bit of what you learned (but having that understanding is useful). OpenGL is split into the 'core profile' and the 'compatibility profile'. The OpenGL Core Profile, OpenGL ES and WebGL all use the same methods so learning any of them should give you a firm grounding in the others.

So it might be worth while having a crack at learning some of the 'modern' OpenGL 3.x/4.x core profile techniques. That will include shaders.

Most of the new stuff drastically reduces what OpenGL itself is responsible for. It becomes more of a glue layer to bridge between your programs and the video card drivers/hardware. As such the programmer is responsible for just about everything and has more work but the end result is much more efficient and flexible.

The old stuff is known as the 'fixed function pipeline' as OpenGL is responsible for defining a fixed ruleset as to how a vertex is turned into pixels on the screen including translations, lighting and so on. The new way is the 'programmable rendering pipeline' which just gives you the glue functions and leaves it up to you to write the code to turn vertex data into pixels on the screen.

Trying to learn how to do a complete core profile application all at once can be a bit much since there are many different areas that need to be simultaneously integrated and a failure in any one can just leave you with a black screen and no clue what's broken, so it's generally a good idea to split it up into a few different components and learn 1 bit at a time and build up from compatibility profile into the core profile.

Rather than give specific resources ill give you an overall battle plan and what stuff is called so you can google it and find all the resources.

The main problem with the outline is it sounds like your course is learning the 'old' way even when it comes to the shaders.

Matrices

If you understand transform matrices, modify your code to stop using the OpenGL matrix functions (glPushMatrix, glPopMatrix, glRotate, glTranslate, glScale, glFrustrum, gluPerspective, glLoadIdentity, glMatrixMode, glOrthagonal, gluLookAt). All the matrix operations have been deprecated in the OpenGL Core Profile. There are 2 ways to do this. Either you will need to write your own matrix functions for the above which can be a handy learning experience but time consuming and really requiring an indepth understanding of the matrix stuff. Or alternatively you can look at using the GLM library (it's part of the recommended libraries in the OpenGL SDK (which is just a collection of recommended practices rather than a real SDK but it's about as close to 'official' as you will get), it is a C++ library so if your programming in something else you might have to look around for something similar). At this point you will need to load your resulting matrices with glLoadMatrix, this function is also deprecated but it's worth using at this stage. Later on you will learn how to 'bind' your matrices with your shader programs.

VBOs

Secondly learn 'Vertex Buffer Objects'. The old way of doing things was to use (glBegin, glEnd, glVertex, glNormal, glColor, glTexCoord, glMultiTexCoord which are now all deprecated). That way involves pushing vertices and their attributes one at a time which is very slow. The new way involves putting all that data into an array and 'uploading' it to the video card's internal memory then just calling a function to draw it all at once.

Vertex buffer objects are part of both the 'old' way and the 'new' way. The difference is how they are implemented.

In the old way you set a special vertex pointer that informs OpenGL you want to mark that memory as vertex data, and other dedicated pointers for normals, color, texcoords and so on. Then your shaders in GLSL have special, dedicated variable names to access that data (gl_Vertex, gl_Normal) If you are doing VBO's befoure you have written your own shaders you will probably need to do it this way. Those functions are glEnableClientState(GL_VERTEX_ARRAY), glVertexPointer (..) and so on.

With the new way you use what are called Vertex Attributes. Basically OpenGL treats all your vertex data as raw data rather than giving it any special significance. It doesn't care if you have vertex positions, colours, texture coordinates, lighting normals. You can even make your own nonstandard stuff like temperature which you could use for doing infrared or velocity to handle some kind of pervertex speed distortion. You then 'bind' this data to your shader program and
you* give it the significance.

Shaders
Shaders are really several topics.

  • OpenGL's shader API. How you load, link and compile shaders and how you bind data to the shaders variables. Also how you can pull up log information to see why it didn't compile.
  • GLSL The languages itself, not too complex since it's like C/C++.
  • Algorithms This is the complicated mathematical stuff. To begin what you will want to learn is how you calculate basic shading. There are different shading algorithms. Lambert, Blinn, Phong, Blinn-Phong, Gouraud. They can be done either pervertex (this looks splotchy or 'starry' unless you have really large numbers of polygons on your meshes) or perpixel (better quality and most modern hardware is fast enough to handle it). The fixed function pipeline uses Gouraud shading pervertex when glShadeModel(GL_SMOOTH) is enabled if you just want to emulate that. I recommend you look at Blinn perpixel.

    Once you are doing shaders you can start binding Vertex Attributes rather than using the fixed specialized VertexAttribPointers.

    Basic texturing is really dead easy and will be done in the shaders. All you are doing it basically giving coordinates to map a triangle to a 1.0 x 1.0 square. Then you pick the color at that point and multiply it by the shading color.

    The main problem with shaders is they are too flexible. There is no standardized way to do anything. For your lighting do you just want 1 or 2 basic fixed lights that might just have a position, or do you want an array of structs for multiple complex lights. Do you want 1 basic flat image texture, or do you want a a few image textures, a normal map texture (for bump mapping), another one for self illumination.

    Then there is the really complex stuff. Bloom, HDR lighting, Ambient occlusion, various antialiasing techniques (MSAA, FSAA, etc...), parallax occlusion mapping, various shadow techniques, multipass rendering, deferred rendering. Techniques for order independent transparency (so you don't have to render transparenct polygons in a specific order). I don't recommend you try any of that stuff but do google the descriptions of what they are.


    Books

    Buy a book or 2. (or download them if your cheap).

    To be honest I haven't really read most of these books, just flipped though them and tend to google for the specific topic I want. But they are recommended often enough and I would like to get around to actually reading them properly.

  • The OpenGL Programming Guide - Also known as 'The Red Book'. This is the modern version of the 'guide' you had listed above, updated for newer versions of OpenGL. It's normally the goto learning OpenGL book. But I actually advice you to avoid it at this stage. Basically while the latest 7th edition has been updated for the new versions of OpenGL it's only very superficially covered and the tutorials all use compatibility profile stuff they just point out that it's deprecated. There is a new 8th edition coming in May 2012 that is supposed to cover the new stuff better. With that said the 7th should still do for things like shaders without problems. It's somewhat harder that other learning resources.

  • OpenGL Shading Language - Also known as 'The Orange Book'. This teaches you GLSL and hopefully the shading algorithms. linky.

  • OpenGL ES 2.0 Programming Guide - You mentioned doing OpenGL ES. This should help you with normal OpenGL as OpenGL ES is the subset of OpenGL that removes the fixed function pipeline. link.

  • OpenGL SuperBible - 5th edition - This teaches the new core profile. It covers things like vertex buffer objects, shaders and so on. The main draw back is at the start it does it by including a set of helper crutch libraries but as you progress you learn to implement their functionality yourself. Linky.
u/[deleted] · 7 pointsr/gamedev

OpengL SuperBible 5th edition just came out and covers "modern" (programable pipeline + no intermediate mode) opengl check it out http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617

it's not game dev specific but seems to be what your looking for

u/MrBushido2318 · 3 pointsr/gamedev

On the math side I read 3d Math primer for graphics and games as it was one of the only 3d math books available for the kindle. It is a pretty easy read and covers a lot of subjects. I'm considering picking up Essential Mathematics for Games and Interactive programming as a refresher if it ever gets released as an ebook since I've seen it be recommended a few times and it is a slightly more recent text.

As for the 3d programming side, it really depends on what you want to do. I chose to program in opengl and picked up the opengl superbible, which I would recommend. I've not touched directx yet, but have heard good things about Practical Rendering and Computation in Directx11 though I don't think this is intended as an introductory text for directx, but as a reference for those familiar with 3d already.

u/Maeln · 3 pointsr/opengl

The 4th edition only talk about OpenGL 2.1, if you want to learn modern OpenGL ( 3.x ) buy the 5th edition ( http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_2?s=books&ie=UTF8&qid=1319548380&sr=1-2 ), but it's only about OpenGL 3.3, not 4.x.

The link alexincode gave you is very good even if it's for OpenGL 3.3 too. But, the author seems to keep updating the tutorial, so it's possible to see an update for OpenGL 4.x.

u/Steve132 · 2 pointsr/learnprogramming

I've never heard of swiftless, but I respectfully disagree. NEHE was bad code back in the 2000's, and its even worse code compared to modern standards. Especially considering that it doesn't even cover opengl 2, let alone modern opengl 3 and 4, and you are in a bad way. The absolute best way to learn opengl is (this book)[http://www.amazon.com/gp/product/0321712617/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0321498828&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=07QWC8BS1749Q8BW8EPT]

u/stormblaast · 2 pointsr/gamedev

I can recommend to you the OpenGL SuperBible: Comprehensive Tutorial and Reference (5th Edition). Note the 5th edition. There is now also a 6th edition coming, but I don't think it's out yet. Really good, modern approach to 3D (OpenGL) with simple code samples that work in Windows, Linux or OS X.

NOTE: This book is not about writing a 3D game engine. This is ONLY about the graphics side of things, which can be overwhelming enough.

u/ebonyseraphim · 2 pointsr/learnprogramming

You are definitely going to be the rate limiter learning anything so no tutorial or book is going to be much faster than the next. If you understand all of the core concepts of shading languages, then I'd say you should pick up a reference book:

http://www.amazon.com/OpenGL-Shading-Language-Randi-Rost/dp/0321637631/ref=pd_sim_b_1

Or go straight to the reference documentation here:

http://www.opengl.org/documentation/glsl/

If you don't know OpenGL that well and need a more comprehensive graphics programming start I'd strongly recommend this book:

http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_2?ie=UTF8&qid=1302142851&sr=8-2

u/przemo_li · 2 pointsr/gamedev

This stackoverflow question
Have some good answers.

Web resources (good)

OpenGLBook OpenGL 4.0

Arcsynthesis OpenGL 3.3


Books (unknown quality, look for reviews)

OpenGL SuperBible 5th Edition OpenGL 3.2 Core

OpenGL 4.0 shading language cookbook OpenGL 4.0 Core

u/Asyx · 1 pointr/gamedev

Superbible

This should be really good and the most important of the following books. I ordered it on the 25th and it comes tomorrow. It is more like a tutorial or a guide than just a reference.

Official Reference

This is more a reference as far as I know. This is the official book so I think that you'll find more deep informations in this book. The Superbible could contain some nice tricks as well.

Shading language!

For the shading language. Has a few pictures in it so it could be good for some shaders.

I got these book from a guy on IRC. He said he wrote some driver stuff for Apple and made the planet and asteroids demo on the WWDC. I don't know if I can believe him but I felt like he is a clever OpenGL guy and the whole IRC channel said so as well.

BTW: Don't buy OpenGL 4.x stuff. Apple hasn't even implemented OpenGL 3 completely.

u/distractedagain · 1 pointr/gamedev

A couple of things in response to you and others.

First of all OpenGL has excellent documentation. The specification is detailed and complete for one though I admit, probably no one should start with that.

I own the following 2 books which are excellent and the first has been out for over a year and you can download the code for both.

http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=sr_1_2?ie=UTF8&qid=1319148333&sr=8-2

http://www.amazon.com/OpenGL-4-0-Shading-Language-Cookbook/dp/1849514763/ref=sr_1_1?s=books&ie=UTF8&qid=1319148364&sr=1-1


I started from no knowledge of OpenGL and using that first book I've learned the majority of the API. I bought it and used it for my upper division graphics class while everyone else was using OpenGL 1.1 and the professor didn't mind as long as I did the assignments. I've rewritten math and some of the helper code that comes with it and I use my own classes to wrap the VABO's (ie one glGenVertexArrays per mesh). It's not hard. I've also taken and modified some of the code from the second book which I just recently purchased.

Finally the new orange book will be coming out soon if the blue book isn't enough for you:
http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321773039/ref=sr_1_3?s=books&ie=UTF8&qid=1319148522&sr=1-3


Also I think people should start with the Blue book instead of 4.0/4.1/4.2 stuff so they'll be able to use the new Core API (no deprecated cruft) while still supporting 3+ year old graphics cards. ie don't use subroutines or the 2 new tessellation shader stages but you can still use the geometry shader etc. Learn that after so if you choose to you can knowingly limit your audience.

Finally I have a question for you. Why do you disable the attribute after drawing? I enable the appropriate attributes for every VBO I create (wrapped in a class function) and I never disable any. I draw things with multiple shaders, some with position, normal, texture coordinates and some with only position etc. and it's never caused a problem. I've never seen sample code that disables an attribute. The documentation (3.3) for glEnableVertexAttribArray() doesn't say that it only applies to the currently bound VABO.

Wait a second, I didn't realize that you're just using the "global" scope buffer objects and not even using VABO's. They make it much easier.

Also the new API makes it easier to understand what's going on under the hood. I started a software renderer and the farther I got the more I appreciated why they did/do things the way they do in 3.3/4.x . I think I'll end up just implementing a proper subset of the API as a software renderer (with function shaders instead of compiled GLSL of course).