-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.cpp
77 lines (65 loc) · 1.5 KB
/
table.cpp
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
void table(void)
{
//top
//glColor3d(0, 0, 0);
glPushMatrix();
glBindTexture(GL_TEXTURE_2D, 5);
glEnable(GL_TEXTURE_2D);
glTranslated(0, 0.9, 0);
glScaled(3, 0.05, 1.5);
glRotated(90, 1, 0, 0);
cube();
glDisable(GL_TEXTURE_2D);
glPopMatrix();
//left_front_leg
glBindTexture(GL_TEXTURE_2D, 6);
glEnable(GL_TEXTURE_2D);
glPushMatrix();
glTranslated(-2.5,-0.35,1);
glScaled(0.15, 1.2, 0.15);
cube();
glPopMatrix();
//right_front_leg
glPushMatrix();
glTranslated(2.5,-0.35,1);
glScaled(0.15, 1.2, 0.15);
cube();
glPopMatrix();
//hind_left_leg
glPushMatrix();
glTranslated(-2.5,-0.35,-1);
glScaled(0.15, 1.2, 0.15);
cube();
glPopMatrix();
//hind_right_leg
glPushMatrix();
glTranslated(2.5,-0.35,-1);
glScaled(0.15, 1.2, 0.15);
cube();
glPopMatrix();
//front_base
glPushMatrix();
glTranslated(0, 0.7, 1);
glScaled(2.35, 0.15, 0.15);
cube();
glPopMatrix();
//hind_base
glPushMatrix();
glTranslated(0, 0.7, -1);
glScaled(2.35, 0.15, 0.15);
cube();
glPopMatrix();
//right_base
glPushMatrix();
glTranslated(2.5, 0.7, 0);
glScaled(0.15, 0.15, 0.925);
cube();
glPopMatrix();
//left_base
glPushMatrix();
glTranslated(-2.5, 0.7, 0);
glScaled(0.15, 0.15, 0.925);
cube();
glPopMatrix();
glDisable(GL_TEXTURE_2D);
}