#597 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)

Sentiment score: 5
Reddit mentions: 12

We found 12 Reddit mentions of OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition). Here are the top ones.

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition)
Buying options
View on Amazon.com
or
    Features:
  • AK Peters
Specs:
Height9 Inches
Length7 Inches
Number of items1
Weight3.28929694904 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 Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition):

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/whisky_pete · 7 pointsr/opengl

May I suggest:

http://ogldev.atspace.co.uk/

supplemented by:
https://open.gl/
http://learnopengl.com/

I'm going through the first tutorial now after prior experience building an instance rendering system for 2d sprites. So, I've had some basic interaction with the API and know some of the linear algebra basics (vectors, matrix transforms, dot product & cross product). The ogldev tutorial is pretty comprehensive in a way that many tutorials are not, so I'd suggest starting there and using the other two sites as a reference. I believe the ogldev author maintains a Visual Studio project for building their examples, but I haven't used it as I'm developing on linux.

Be patient and try to really read through the examples. OpenGL isn't the simplest API, and 3D graphics are a totally different way of thinking if you haven't done that type of development before. I'd avoid trying to copy-paste solutions and learn that way, because you won't end up with a deep understanding that you really need. This comes from an aspiring graphics developer who is looking to get into the industry, so take what I said with a grain of salt as well.

EDIT:

And, if you're really serious and want to look into picking up books, I can suggest these:
Real-Time Rendering, 3rd Edition

3D Math Primer for Graphics and Game Development

OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition) if you need an api reference. Additionally, for a short-hand api reference thats useable, try docs.gl

u/slime73 · 5 pointsr/gamedev

Why are you linking a guide from 1997? Graphics programming has changed a lot since then, and you'll learn (and then have to un-learn) bad habits by using techniques from the mid-90's. :(

For modern OpenGL tutorials, check out these:

http://www.arcsynthesis.org/gltut/

http://open.gl

http://openglbook.com

http://ogldev.atspace.co.uk

And some real books:

http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321902947/

http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321773039

u/gelftheelf · 3 pointsr/gamedevnoobs

I'd like to recommend the following:

A great book for foundations (math stuff):

3D Math Primer for Graphics and Game Development
http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119
I found this to have really nice clear explanations of Vectors, Matrixes, etc.

For learning OpenGL the "red" book is great!

OpenGL Programming Guide: The Official Guide to Learning OpenGL
http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321773039/ref=dp_ob_title_bk

I haven't read this one but a lot of people recommend it for Unity.

Unity 3.x Game Development Essentials
http://www.amazon.com/Unity-3-x-Game-Development-Essentials/dp/1849691444/ref=sr_1_1?ie=UTF8&qid=1334698866&sr=8-1

u/TurkishSquirrel · 3 pointsr/learnprogramming

If this is the book you're referring too, it came out in 2000 and is definitely outdated. From your post it sounds like you're kind of confused on what OpenGL really is. OpenGL is a specification for a graphics API that is implemented by various hardware vendors (AMD/NVIDIA for ex.) which you can use to make their hardware do stuff without having to worry about differences between the platforms. You can read up on the OpenGL spec and documentation at OpenGL.org.

FreeGLUT isn't a replacement/substitute for OpenGL, it's a library that makes it easy to open up a window and get an OpenGL context for rendering on Windows/Linux/Mac without having to worry about each OS's differences (it also lets you handle input I think). There are many libraries capable of doing this, or do this and provide much more: SDL, SFML, GLFW. GLFW is window/input only I think, but SDL and SFML also have their own simpler rendering APIs along with providing sound playback, networking and so on. Another really useful library is GLEW which lets you get access to various OpenGL extensions and modern functions across OS's.

If you want to learn modern OpenGL (3.3+) (which is the one you want!) the /r/opengl subreddit has some good links on the sidebar, and the 8th edition of the Red book just came out recently covering OpenGL 4.3. Although the Red book's focus is on OpenGL not rendering theory, so I think for a beginner you'd need some supplemental material to cover theory. A book I've found really helpful that focuses on the math/theory behind graphics programming is Real Time Rendering which is API agnostic (ie. just math/theory/algorithms). One of the authors of the book actually put up a course on Udacity: Interactive 3D Graphics, which teaches graphics programming through WebGL (including math/theory!) and you may find that really helpful. WebGL is OpenGL ES 2 in Javascript, and OpenGL ES 2 is based on OpenGL 2 but without the ancient fixed function stuff and looks more similar to OpenGL 3.3, so it's kind of inbetween OpenGL 2.1 and 3.3, so it's certainly modern enough and a course worth taking, even if your plans are to work on the desktop later.

There is a free version of VS, but you can do OpenGL programming on Linux as long as you've got the drivers for your graphics hardware, so no reason to switch unless you want to or can't get the graphics drivers.

u/malexw · 2 pointsr/learnprogramming

Amazon Link

Apparently it's going to cover version 4.1, and won't be out until December. But I could have sworn that when I was looking at it 3 weeks ago that it covered version 4.0 and was due for release on October 1.

Actually, I remember looking at it back in March and I seem to recall a May 1 launch date back then. So this seems to be at least the second delay now.

u/Andallas · 2 pointsr/gamedev

For #2 I can't recommend this book enough;
Link
It's specifically for openGL, but nearly the entire book is about shaders. This is because 'modern' openGL is pretty much all shaders.

It's currently version 4.3, and I believe openGL is now on version 4.4, but you should be able to google whatever may have been added with a minor version update.

I'm not sure of the differences between what UE4 uses (haven't checked it out yet) and openGL, but it will definitely be a great book to have regardless.

u/AlternativeHistorian · 1 pointr/learnprogramming

It's a little more complicated than the type of thing that I could normally explain in a Reddit comment. For a full understanding you need at least a basic working knowledge of linear algebra.

Here's a decent overview. If you can grok all that you'll have a good understanding of how the PROJECTION and MODELVIEW matrix interact and how OpenGL uses it to project your 3D scene into a 2D plane.

If you're using low-level OpenGL (as opposed to a higher-level library on top of OpenGL) you have to understand this stuff to have any real control over what you're doing when you manipulate the PROJECTION or MODELVIEW matrix. Typically, a higher-level library would wrap all this stuff up in a Camera class or similar to protect you from the nitty-gritty.

I don't know what the standard OpenGL learning resource is now, I learned from "the red book" which was considered the standard back when I read it.

u/NihonNoRyu · 1 pointr/cscareerquestions

You could look at 3d graphics programming, threading or distributed programming.

Or webGL, HTML5,CSS, JS

WebGL Programming Guide

OpenGL Programming Guide

Real-Time Rendering

The Art of Multiprocessor Programming

Beej's Guide to Network Programming

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