nodebox/nodebox-opengl — pull request #2 by jsundram (2013-04-08 08:59:01+00:00)
Title: rect was pretty slow

Using GL_POLYGON was a lot slower than glRectf for 2 reasons:
1. GL_POLYGON isn't purpose-built for rectangles
2. there's a lot less function calls just using glRectf.

Similarly, I believe that line should use GL_LINES and triangle() should use GL_TRIANGLES, although these changes wouldn't get the benefit of 2).

I didn't make those changes because I haven't had time to test them yet.