Skip to content

Instantly share code, notes, and snippets.

@0xa
Created May 11, 2013 12:10
Show Gist options
  • Select an option

  • Save 0xa/5559799 to your computer and use it in GitHub Desktop.

Select an option

Save 0xa/5559799 to your computer and use it in GitHub Desktop.
A green square.
void drawStuff() {
static GLfloat wtf = .0f; static bool way = true;
glColor3f(.0f, (wtf+=.002f*((way=(wtf<.0f||wtf>=.6f)?!way:way)?1:-1)), .0f);
glBegin(GL_QUADS); {
glVertex2f(0, 0); glVertex2f(400, 0);
glVertex2f(400, 400); glVertex2f(0, 400);
} glEnd();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment