2021-03-15 01:22:47 +00:00
|
|
|
void :: glClear();
|
|
|
|
void :: glBegin();
|
|
|
|
void :: glVertex3f();
|
|
|
|
void :: glEnd();
|
|
|
|
void :: glFlush();
|
|
|
|
|
|
|
|
void :: glutInit();
|
|
|
|
void :: glutInitDisplayMode();
|
|
|
|
void :: glutInitWindowPosition();
|
|
|
|
void :: glutInitWindowSize();
|
|
|
|
void :: glutCreateWindow();
|
|
|
|
void :: glutDisplayFunc();
|
|
|
|
void :: glutMainLoop();
|
|
|
|
|
|
|
|
|
|
|
|
void :: display() {
|
|
|
|
glClear(16384);
|
|
|
|
glBegin(9);
|
|
|
|
|
|
|
|
glVertex3f(0, 0, 0);
|
|
|
|
glVertex3f(1, 0, 0);
|
|
|
|
glVertex3f(1, 1, 0);
|
|
|
|
glVertex3f(0, 1, 0);
|
|
|
|
|
|
|
|
glEnd();
|
|
|
|
|
|
|
|
glFlush();
|
|
|
|
}
|
|
|
|
|
|
|
|
int :: main(int argc, char** argv) {
|
|
|
|
glutInit(&argc, argv);
|
|
|
|
glutInitDisplayMode(0);
|
|
|
|
glutInitWindowSize(300, 300);
|
|
|
|
glutInitWindowPosition(100, 100);
|
|
|
|
glutCreateWindow("Hello");
|
|
|
|
glutDisplayFunc(display);
|
|
|
|
glutMainLoop();
|
|
|
|
|
2021-03-15 15:59:15 +00:00
|
|
|
return (0);
|
2021-03-15 01:22:47 +00:00
|
|
|
}
|