#include <iostream>
#include <cstdlib>
#include <GL/glut.h>
using namespace std;
static int win;
void disp(void);
void keyb(unsigned char key, int x, int y);
int main(int argc, char **argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_SINGLE);
glutInitWindowSize(500,500);
win = glutCreateWindow("Here is a sphere, for some reason");
glutDisplayFunc(disp);
glutKeyboardFunc(keyb);
glClearColor(0.0,0.0,0.0,0.0);
glutMainLoop();
return 0;
}
void disp(void){
glClear(GL_COLOR_BUFFER_BIT);
glutWireSphere(0.5,100,100);
}
void keyb(unsigned char key, int x, int y){
if(key == 'q'){
glutDestroyWindow(win);
exit(0);
}
}
|