-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPartice-multiple1.cpp
More file actions
54 lines (39 loc) · 984 Bytes
/
Partice-multiple1.cpp
File metadata and controls
54 lines (39 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <windows.h>
#include <GL/glut.h>
void display() {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
gluOrtho2D(0, 22, 0, 12);
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_QUADS);
glColor3f(1.0f, 0.440f, 0.20f);
// glVertex2f(-2.0f, -2.0f);
// glVertex2f(2.0f, -2.0f);
// glVertex2f(2.0f, 2.0f);
// glVertex2f(-2.0f, 2.0f);
glVertex2i(6, 1);
glVertex2i(10, 7);
glVertex2i(6, 12);
glVertex2i(2, 7);
glColor3f(0, 01, 0);
glVertex2i(10, 1);
glVertex2i(14, 6);
glVertex2i(10, 12);
glVertex2i(6, 6);
// glVertex2i(2, 7);
glColor3f(0, 01, 0.5);
glVertex2i(16, 1);
glVertex2i(20, 6);
glVertex2i(20, 12);
glVertex2i(12, 6);
glEnd();
glFlush();
}
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutCreateWindow("Simple Square");
glutInitWindowSize(900, 800);
glutInitWindowPosition(50, 50);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}