Skip to content

Conversation

@jsundram
Copy link
Contributor

@jsundram jsundram commented Apr 8, 2013

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 fewer 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.

fdb pushed a commit that referenced this pull request Apr 8, 2013
Make the rect function faster using glRectf.
@fdb fdb merged commit 2427499 into nodebox:master Apr 8, 2013
@fdb
Copy link
Member

fdb commented Apr 8, 2013

Looks good. Thanks for the change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants