July 2013
Intermediate to advanced
600 pages
15h 15m
English
Chapter 2, “Your First Step with WebGL,” explained the basic approach to drawing WebGL graphics. You saw how to retrieve the WebGL context and clear a <canvas> in preparation for drawing your 2D/3DCG. You then explored the roles and features of the vertex and fragment shaders and how to actually draw graphics with them. With this basic structure in mind, you then constructed several sample programs that drew simple shapes composed of points on the screen.
This chapter builds on those basics by exploring how to draw more complex shapes and how to manipulate those shapes in 3D space. In particular, this chapter looks at
• The critical role of triangles in 3DCG and WebGL’s support for drawing triangles ...
Read now
Unlock full access