Recommend: Learning Modern 3D Graphics Programming (OpenGL, Jason L. McKesson)

Scott_Arm

Legend
http://www.arcsynthesis.org/gltut/index.html

I found this free online book (I can't remember where), but it's great. I can't find much info about the author, Jason L. McKesson, other than a credit as a programmer for NHL 2K2. Every once in a while I see a question pop up on the forums asking where to learn OpenGL, and I think this is a really good starting point. I had no experience with OpenGL at all, and this is really easy to follow along with. You will need to know some C/C++ to go through this, but there is nothing particularly outrageous to follow along with the instructional material and the source code.

The book has source code. It does use FreeGLUT, but I'm finding that to be a pretty nice way to learn. It skips all of the deprecated fixed-pipeline stuff from OpenGL. It teaches you about vertex and fragment shaders right from the start. All of the other books I found started with fixed functionality and introduced shaders later. It looks like it is still being actively written, as chapters 5 and 6 are not complete. What you get from chapters 1 through 4 is a pretty good base to start from.

If I could find some way to contact the author, I'd send him a message to tell him how great his book is. I mean, it's completely free and way easier to learn from than any of the other books I've seen.
 
Ah, yes, framebuffers. That's one of the blank chapters in the link I posted. It'll be a bit before I hit that part, but now I have the link you provided for when I'm ready.
 
So you'd need to know c++ or c first
Had a quick look, vectors have xyz + direction(w) I understand the xyz but how is direction expressed ?

then it says vectors also have length but vectors do not have an origin ???
if the have an xyz position and length they must have an origin ?
 
So you'd need to know c++ or c first
Had a quick look, vectors have xyz + direction(w) I understand the xyz but how is direction expressed ?

then it says vectors also have length but vectors do not have an origin ???
if the have an xyz position and length they must have an origin ?

Vector can be a position or a direction (using O as origin).

w is generally used for homogeneous coordinates. That is, a vector with <x, y, z, w> in homogeneous coordinates actually means <x/w, y/w, z/w> in a 3D space.
 
@Davros Mathematically <x,y,z,w> is a four dimensional vector, mostly in our 3D-data there is no four-dimensional geometric meaning though. So it is set to 1.0, which means all 3D geometry lies on the same hyper-plane in 4D.

pcchen's <x/w, y/w, z/w> is the standard projection from 4D to 3D, just like <x/z, y/z> is for 3D to 2D.
You see with w=1 it cancels out neutrally. The same as if 2D-objects lie on the same plane in 3D at z=1, you'd see them exactly as planar.

<w> has been introduced to make single rotation+scale+translation matrices possible, which need to be 4x4, and is mathematically a transform in 4D. It's maybe difficult to visualize mentally the implications on a 3D-object, but anyway then the whole thing is kind of a Frankenstein-solution. It works, but's not a beauty.
You can read through lots of material about homogenous matrices and "coordinate spaces".
 
So you'd need to know c++ or c first
Had a quick look, vectors have xyz + direction(w) I understand the xyz but how is direction expressed ?

then it says vectors also have length but vectors do not have an origin ???
if the have an xyz position and length they must have an origin ?

There's quite a bit more on <w> later in the book. I think the first section it is really mentioned is when he starts on perspective correction. I read through the whole thing once, and now I'm going back through again, but this time implementing as I go.
 
The book seems stalled, the framebuffer chapters never came to life. However, this other much simpler tutorial has good info on them: http://open.gl/

---

Anyway, I had lots of trouble trying to make FreeGLUT work on OS X. It seems that X11.org doesn't support OpenGL 3.2 contexts on OS X and you need that in order to use FreeGLUT with these tutorials.

Because of that I'm redoing the book tutorials using FLGW3. I only adds parts from McKesson's framework as needed, so the simpler tutorials are easier to compiler and understand. I'm only providing an Xcode project (works straight away on OS X), but the code should be pretty much cross-platform and a Makefile should not be difficult to write.

In case anybody is interested, you can find it here: https://github.com/rsanchezsaez/gltut-flgw
 
This old thread of mine is still alive! I have too many hobbies and this had fallen to the wayside. I'm going to get back into it, I think. Thanks for all the other links. I'm going to take a look.
 
Back
Top