Vertices

What are we drawing? Objects drawn in OpenGL are specified in terms of verticies. This example builds a triangle from three vertices.

    /** Like any three dimensional polygon, we specify the vertices. */                
    final float[] vertexData       =
    {
      -1.0, -1.0,  0.0,
       1.0, -1.0,  0.0,
       0.0,   1.0, 0.0
    };
(0,1) (-1,-1) (1,-1)

Notes

We will be working with a triangle (-1,-1) (1,-1) (0,1). For simplicity we set z=0 to draw a 2-d triangle. We will talk more about the significance of these points later. Each of these points, where the edges of the triangle meet, is called a vertex. You might even remember this from your high school geometry classes. No? Well, it's been a long time for me too.

The vertex is one of the most fundamental concepts in OpenGL, so we will see it a lot.