40 lines
746 B
Plaintext
40 lines
746 B
Plaintext
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();
|
|
|
|
return (0);
|
|
} |