Chapter 4. Math for 3D Graphics

What You’ll Learn in This Chapter

• What a vector is, and why you should care about them.

• What a matrix is, and why you should care more about them.

• How we use matrices and vectors to move geometry around.

• What the OpenGL conventions and coordinate spaces are.

So far, you have learned to draw points, lines, and triangles and have written simple shaders that pass your hard-coded vertex data through unmodified. We haven’t really been rendering in 3D—which is odd for a book on 3D graphics! Well, to turn a collection of shapes into a coherent scene, you must arrange them in relation to one another and to the viewer. In this chapter, you start moving shapes and objects around in your coordinate system. The ability ...

Get OpenGL SuperBible: Comprehensive Tutorial and Reference, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.