Created
April 18, 2022 00:46
-
-
Save WillForan/0e4b4f8f4c8d103e780e0438aa25bbd9 to your computer and use it in GitHub Desktop.
This file contains 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
teapot: teapot.cc | |
g++ -o teapot teapot.cc -lGL -lGLU -lglut |
This file contains 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
// helloteapot.cc | |
#include <GL/gl.h> | |
#include <GL/glut.h> | |
void display () { | |
/* clear window */ | |
glClear(GL_COLOR_BUFFER_BIT); | |
/* draw scene */ | |
//glutSolidTeapot(.5); | |
glutWireTeapot(1); | |
/* flush drawing routines to the window */ | |
glFlush(); | |
} | |
int main ( int argc, char * argv[] ) { | |
/* initialize GLUT, using any commandline parameters passed to the | |
program */ | |
glutInit(&argc,argv); | |
/* setup the size, position, and display mode for new windows */ | |
glutInitWindowSize(500,500); | |
glutInitWindowPosition(0,0); | |
glutInitDisplayMode(GLUT_RGB); | |
/* create and set up a window */ | |
glutCreateWindow("hello, teapot!"); | |
glutDisplayFunc(display); | |
/* tell GLUT to wait for events */ | |
glutMainLoop(); | |
} |
This file contains 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
#!/usr/bin/env perl | |
use OpenGL::GLUT ':all'; | |
glutInit; my $Window_ID = glutCreateWindow("wtitle"); | |
#glutSolidTeapot(1); | |
glutWireTeapot(1); | |
glutSwapBuffers(); | |
sleep 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment