using list to draw triangles in open gl