Thanks but ofLine seems like it's pretty slow to use on iOS.
That's why I was thinking to replace ofLine with Gl_LINES since people say it's much faster.
But unfortunately, I can't use the same code above since iOS only supports OpenGL ES 1.1 and 2.0.
I would really appreciate if anyone can give me a tip how to replace ofLine with GL_LINES on iOS.