#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
void display(){
glClear(GL_COLOR_BUFFER_BIT);
glutWireTeapot(0.5);
glFlush();
}
int main(int argc, char *argv[]){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowSize(400, 300); // horizontal, vertical
glutInitWindowPosition(200, 100); // horizontal, vertical
glutCreateWindow("Hello World"); // title of the window
glutDisplayFunc(display);
glutMainLoop();
return 0;
}You can get learning from this link: Wikibooks or cs.uccs
No comments:
Post a Comment