Chapter 2. Rendering Geometry

WebGL renders objects following a "divide and conquer" approach. Complex polygons are decomposed into triangles, lines, and point primitives. Then, each geometric primitive is processed in parallel by the GPU through a series of steps, known as the rendering pipeline, in order to create the final scene that is displayed on the canvas.

The first step to use the rendering pipeline is to define geometric entities. In this chapter, we will take a look at how geometric entities are defined in WebGL.

In this chapter, we will:

  • Understand how WebGL defines and processes geometric information
  • Discuss the relevant API methods that relate to geometry manipulation
  • Examine why and how to use JavaScript Object Notation (JSON) to ...

Get WebGL Beginner's Guide 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.