Created
September 13, 2012 08:39
-
-
Save acdimalev/3712927 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc foo.c $(pkg-config --cflags --libs glew gl) -lglut | |
#include <GL/glew.h> | |
#include <GL/glut.h> | |
void display() { | |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | |
glutSolidSphere(1, 8, 8); | |
glutSwapBuffers(); | |
} | |
int main(int argc, char **argv) { | |
glutInit(&argc, argv); | |
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); | |
glutInitWindowSize(320, 180); | |
glutCreateWindow("title"); | |
glewInit(); | |
glEnable(GL_DEPTH_TEST); | |
glutDisplayFunc(display); | |
glutMainLoop(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment