Skip to content

Instantly share code, notes, and snippets.

@borja-munoz
Created November 14, 2021 14:46
Show Gist options
  • Save borja-munoz/e6acb89b80b5bf929917e503b716e931 to your computer and use it in GitHub Desktop.
Save borja-munoz/e6acb89b80b5bf929917e503b716e931 to your computer and use it in GitHub Desktop.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glColor3f(1.0f, 0.0f, 0.0f);
glVertex3f(0.5f, -0.5f, 0.0f);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3f(-0.5f, -0.5f, 0.0f);
glColor3f(0.0f, 0.0f, 1.0f);
glVertex3f(0.0f, 0.5f, 0.0f);
glEnd();
glFlush();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment