I want something that explains step by step how, after setting up a simple scene I can go from that 'world' space, to what's finally rendered on my screen (ie, actually implement something). I need the resource to clearly show how to derive and set up both orthographic and perspective projection matrices... basically I want to thoroughly understand what's going on behind the scenes and not plug in random things without knowing what they do.

I've found lots of half explanations, presentation slides, walls of text, etc that aren't really doing much for me. I have a basic understanding of linear algebra/matrix transforms, and a rough idea of what's going on when you go from model space -> screen, but not enough to actually implement it in code.


It all starts here: thick enough to stun an ox and to steal a meme: "If you don't like a wall of text, you're gonna have a bad time."

Then since you're concerned with OpenGL, a side trip down Route 666 one of the classic OpenGL books

But if you want to short circuit understanding of a complete graphics pipeline and just want to focus on some math for the 3D stuff then maybe something like: just the 3D math bits or some similar book.

After all that you'll want to pore over GLSL references because modern pipelines are mostly shader driven, which should keep you occupied for a while.

  • \$\begingroup\$ I appreciate the reply, but suggesting I read three books to understand how to start drawing simple stuff on the screen with OpenGL ES 2 seems ridiculous. There's gotta be some specific tutorials out there that cover this sort of thing. \$\endgroup\$ – Pris Jun 19 '12 at 17:44
  • \$\begingroup\$ Yes, and no, because there are tons of tutorials for legacy openGL, and if you are like me, you are stuck with an older version (I can only run 2.0) if you want tutorials, try lazyfoo.net, there are two tutorials using SDL and openGL, and there seems to be more coming \$\endgroup\$ – thePalindrome Jun 19 '12 at 17:45
  • \$\begingroup\$ @Pris - If you want to understand everything step by step, then that's what you will need to do, if not a lot more. \$\endgroup\$ – OriginalDaemon Jun 19 '12 at 17:45
  • 3
    \$\begingroup\$ Your question: "I want to thoroughly understand what's going on behind the scenes and not plug in random things without knowing what they do" requires a thorough answer. Without at least having reviewed information from those or similar sources you will be plugging in random things. And your criterium of "actually implement it in code" seals the deal. There's a reason graphics coding is a specialty field in game development companies =) \$\endgroup\$ – Patrick Hughes Jun 19 '12 at 17:54

I'd like to recommend a book I am currently reading: Real-Time Rendering, by Tomas Akenine-Möller, Eric Haines, and Naty Hoffman.

It has info on both OpenGL, DirectX, the rendering process that happens in the hardware and the architecture of the GPU itself. It's neat, to say the least.


An excellent place to start is the Wikipedia entry for rasterisation. This is the basic theory for going from a point to a screen coordinate.

General Overview

What You Need

  • Create a list of points which have a position in 3D space (Vertex Buffer)
  • Create a list of indices to state how these points are linked together (Index Buffer)
  • Create a world matrix for each object so you can change an objects position, scale and orientation without having to recreate the object.
  • Create a view matrix for your camera so you can translate a point from world space into the cameras space (keep in mind that moving the camera is just like moving everything in the world in the opposite direction, move the camera up the world moves down).
  • Create a projection matrix which details how to translate something from view space into a 2D screen coordinate.

What you do with it

  • Take each point in the vertex list and multiply it by the world, then view and then projection matrix to translate the point from object, to world, to view to screen space. This is done in the vertex shader, although the vertex shader isn't limited to this process alone.
  • Use the index buffer to work out the next three points used to make a triangle
  • Scane across the screen, row by row, and for each pixel inside these edges run a pixel shader. The pixel shader will dictate how to calculate the color of the pixel and can be used to add lighting and textures.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.