3.10 - Lines

WebGL supports the rendering of lines. This is useful if you want to draw a wireframe rendering of your model, or outline a face with a border or highlight.

In WebGL you always define one or more lines using an array of vertices. There are three different ways the vertices can be used to form lines, as shown in the diagram below. The options are:

../_images/line_drawing_modes.png

WebGL line drawing modes. (1)

Glossary

line
A straight connection between two points.
wireframe
Rendering a model by displaying only the edges of each triangle.
Next Section - 4.1 - 3D Modeling