How to draw lines

Draw lines using the gl.LINES drawing mode.

data

Vertice Index x y
0 0 2 2
1 1 10 2
2 2 2 3.5
3 3 10 3.5
4 4 2 6
5 5 10 14
6 6 12 2
7 7 20 3
8 8 12 5
9 9 20 6.5
10 10 12 8
11 11 20 10

pixel

r
0
g
0
b
0
a
0
x
0
y
0

Fragment Shader

Vertex Shader