Summary
In this chapter, you explored the process of passing multiple items of information about vertices to a vertex shader, the different types of shapes available to be drawn using that information, and the process of transforming those shapes. The shapes dealt with in this chapter changed from a point to a triangle, but the method of using shaders remained the same, as in the examples in the previous chapter. You were also introduced to matrices and learned how to use transformation matrices to apply translation, rotation, or scaling to 2D shapes. Although it’s a little complicated, you should now have a good understanding of the math behind calculating the individual transformation matrices.
In the next chapter, you’ll explore more complex transformations but will use a handy library to hide the details, allowing you to focus on the higher-level tasks.