Drawing a triangle with OpenGL ES in Android

The scope of this post is drawing a triangle with OpenGL ES 1.x in Android focusing especially on the relationship between code and position of the triangle.
The coordinate system has the origin where the observer is, with the x axis horizontal and rightward, the y-axis vertical and upward and the z axis points so that the observer is looking towards the negative z, then the coordinate system follows the right-hand rule.
The 3 vertices of the triangle have coordinates:

  • A(-0.5, -0.29, -10)
  • B(+0.5, -0.29, -10)
  • C(0, +0.58, -10)

that are the vertices of an equilateral triangle with the barycenter in (0, 0, -10). Continue reading “Drawing a triangle with OpenGL ES in Android”