nodebox/nodebox-opengl — pull request #3 by jsundram (2013-04-22 21:03:16+00:00)
Title: performance enhancements to drawing primitives

I've made the following performance enhancements:
* `line()`: 12-15% faster via `GL_LINES` instead of `GL_LINE_LOOP`
* `triangle()`: 15% faster via `GL_TRIANGLES` instead of `GL_POLGYON` and avoiding calls to `glLineDash` where possible.
* `ellipse()`: 12% faster via `GL_TRIANGLE_FAN` instead of `GL_POLYGON` and avoiding calls to glLineDash where possible.
* `star()`: 15x (thats times, not percent) faster via using `GL_TRIANGLE_FAN` instead of `BezierPath`. This is the only controversial change; As a result of doing the drawing in opengl, I no longer construct the bezier path in the case that `draw=True`. I maintained the old code branch for `draw=False`. I'm not sure how much client code depends on this, but I feel like the performance improvement is probably worth it. If necessary, I could move the opengl code to a differently named function.