Skip to content

Instantly share code, notes, and snippets.

@akyoto
Created June 29, 2012 19:48
Show Gist options
  • Select an option

  • Save akyoto/3020244 to your computer and use it in GitHub Desktop.

Select an option

Save akyoto/3020244 to your computer and use it in GitHub Desktop.
drawRect x1, y1, x2, y2, filled = true
glDisable GL_TEXTURE_2D
if filled
glBegin GL_QUADS
else
glBegin GL_LINE_STRIP
glVertex2i x1, y1
glVertex2i x1, y2
glVertex2i x2, y2
glVertex2i x2, y1
if not filled
glVertex2i x1, y1
glEnd()
glEnable GL_TEXTURE_2D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment