Skip to content

Instantly share code, notes, and snippets.

@tamakiii
Last active January 31, 2018 15:34
Show Gist options
  • Select an option

  • Save tamakiii/d471592f352a5781c377617fd1634dd9 to your computer and use it in GitHub Desktop.

Select an option

Save tamakiii/d471592f352a5781c377617fd1634dd9 to your computer and use it in GitHub Desktop.
OpenGL setup for macOS
#include <GLUT/GLUT.h>
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glutWireTeapot(1);
glFlush();
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition(640, 0);
glutInitWindowSize(640, 640);
glutCreateWindow("Title");
glClearColor(0, 0, 0, 1.0f);
glutDisplayFunc(display);
glutMainLoop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment