mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1540 lines
44 KiB
1540 lines
44 KiB
glsBeginGLS(1, 0);
|
|
glMatrixMode(GL_PROJECTION);
|
|
glLoadIdentity();
|
|
glFrustum(-1, 1, -1, 1, 1, 3);
|
|
glMatrixMode(GL_MODELVIEW);
|
|
glLoadIdentity();
|
|
glTranslatef(0, 0, -2);
|
|
glEnable(GL_DEPTH_TEST);
|
|
glEnable(GL_LIGHTING);
|
|
glEnable(GL_LIGHT0);
|
|
glLightfv(GL_LIGHT0, GL_POSITION, {2, 4, 2, 1});
|
|
glLightfv(GL_LIGHT0, GL_AMBIENT, {0.2, 0.2, 0.2, 1});
|
|
glLightfv(GL_LIGHT0, GL_DIFFUSE, {0.8, 0.8, 0.8, 1});
|
|
glLightfv(GL_LIGHT0, GL_SPECULAR, {0.4, 0.4, 0.4, 1});
|
|
glEnable(GL_NORMALIZE);
|
|
glFogfv(GL_FOG_COLOR, {0, 0, 0, 0});
|
|
glFogfv(GL_FOG_INDEX, {0});
|
|
glFogf(GL_FOG_MODE, GL_EXP);
|
|
glFogf(GL_FOG_DENSITY, 0.5);
|
|
glFogf(GL_FOG_START, 1);
|
|
glFogf(GL_FOG_END, 3);
|
|
glEnable(GL_CULL_FACE);
|
|
glCullFace(GL_BACK);
|
|
glShadeModel(GL_SMOOTH);
|
|
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA);
|
|
glPolygonStipple(GLS_NONE)({
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
|
|
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55
|
|
});
|
|
glClearColor(0, 0, 0, 1);
|
|
glClearIndex(0);
|
|
glClearDepth(1);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glGenLists(1);
|
|
glNewList(1, GL_COMPILE_AND_EXECUTE);
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_QUADS);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-1, -0.666667, 0, 1});
|
|
glVertex4fv({-1, -1, 0, 1});
|
|
glVertex4fv({-0.666667, -1, 0, 1});
|
|
glVertex4fv({-0.666667, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, -1, 0, 1});
|
|
glVertex4fv({-0.333333, -1, 0, 1});
|
|
glVertex4fv({-0.333333, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, -1, 0, 1});
|
|
glVertex4fv({0, -1, 0, 1});
|
|
glVertex4fv({0, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0, -0.666667, 0, 1});
|
|
glVertex4fv({0, -1, 0, 1});
|
|
glVertex4fv({0.333333, -1, 0, 1});
|
|
glVertex4fv({0.333333, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({0.333333, -1, 0, 1});
|
|
glVertex4fv({0.666667, -1, 0, 1});
|
|
glVertex4fv({0.666667, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({0.666667, -1, 0, 1});
|
|
glVertex4fv({1, -1, 0, 1});
|
|
glVertex4fv({1, -0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-1, -0.333333, 0, 1});
|
|
glVertex4fv({-1, -0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({0, -0.666667, 0, 1});
|
|
glVertex4fv({0, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0, -0.333333, 0, 1});
|
|
glVertex4fv({0, -0.666667, 0, 1});
|
|
glVertex4fv({0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({0.333333, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({0.333333, -0.666667, 0, 1});
|
|
glVertex4fv({0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({0.666667, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({0.666667, -0.666667, 0, 1});
|
|
glVertex4fv({1, -0.666667, 0, 1});
|
|
glVertex4fv({1, -0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-1, 0, 0, 1});
|
|
glVertex4fv({-1, -0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.666667, 0, 0, 1});
|
|
glVertex4fv({-0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.333333, 0, 0, 1});
|
|
glVertex4fv({-0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({0, -0.333333, 0, 1});
|
|
glVertex4fv({0, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0, 0, 0, 1});
|
|
glVertex4fv({0, -0.333333, 0, 1});
|
|
glVertex4fv({0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({0.333333, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.333333, 0, 0, 1});
|
|
glVertex4fv({0.333333, -0.333333, 0, 1});
|
|
glVertex4fv({0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({0.666667, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.666667, 0, 0, 1});
|
|
glVertex4fv({0.666667, -0.333333, 0, 1});
|
|
glVertex4fv({1, -0.333333, 0, 1});
|
|
glVertex4fv({1, 0, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-1, 0.333333, 0, 1});
|
|
glVertex4fv({-1, 0, 0, 1});
|
|
glVertex4fv({-0.666667, 0, 0, 1});
|
|
glVertex4fv({-0.666667, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, 0, 0, 1});
|
|
glVertex4fv({-0.333333, 0, 0, 1});
|
|
glVertex4fv({-0.333333, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, 0, 0, 1});
|
|
glVertex4fv({0, 0, 0, 1});
|
|
glVertex4fv({0, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0, 0.333333, 0, 1});
|
|
glVertex4fv({0, 0, 0, 1});
|
|
glVertex4fv({0.333333, 0, 0, 1});
|
|
glVertex4fv({0.333333, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({0.333333, 0, 0, 1});
|
|
glVertex4fv({0.666667, 0, 0, 1});
|
|
glVertex4fv({0.666667, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({0.666667, 0, 0, 1});
|
|
glVertex4fv({1, 0, 0, 1});
|
|
glVertex4fv({1, 0.333333, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-1, 0.666667, 0, 1});
|
|
glVertex4fv({-1, 0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({-0.666667, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({-0.333333, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({0, 0.333333, 0, 1});
|
|
glVertex4fv({0, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0, 0.666667, 0, 1});
|
|
glVertex4fv({0, 0.333333, 0, 1});
|
|
glVertex4fv({0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({0.333333, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({0.333333, 0.333333, 0, 1});
|
|
glVertex4fv({0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({0.666667, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({0.666667, 0.333333, 0, 1});
|
|
glVertex4fv({1, 0.333333, 0, 1});
|
|
glVertex4fv({1, 0.666667, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-1, 1, 0, 1});
|
|
glVertex4fv({-1, 0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({-0.666667, 1, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({-0.666667, 1, 0, 1});
|
|
glVertex4fv({-0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({-0.333333, 1, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({-0.333333, 1, 0, 1});
|
|
glVertex4fv({-0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({0, 0.666667, 0, 1});
|
|
glVertex4fv({0, 1, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0, 1, 0, 1});
|
|
glVertex4fv({0, 0.666667, 0, 1});
|
|
glVertex4fv({0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({0.333333, 1, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0.8, 0, 1});
|
|
glVertex4fv({0.333333, 1, 0, 1});
|
|
glVertex4fv({0.333333, 0.666667, 0, 1});
|
|
glVertex4fv({0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({0.666667, 1, 0, 1});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0.8, 1});
|
|
glVertex4fv({0.666667, 1, 0, 1});
|
|
glVertex4fv({0.666667, 0.666667, 0, 1});
|
|
glVertex4fv({1, 0.666667, 0, 1});
|
|
glVertex4fv({1, 1, 0, 1});
|
|
glEnd();
|
|
glEndList();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(0, 1, 0, 0);
|
|
glRotatef(0, 0, 1, 0);
|
|
glRotatef(0, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.3 , 0 , 0 , 0 ,
|
|
0 , 0.6 , 0 , 0 ,
|
|
0 , 0 , 0.3 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.3 , 0 , 0 , 0 ,
|
|
0 , 0.6 , 0 , 0 ,
|
|
0 , 0 , 0.3 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glViewport(0, 0, 300, 300);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(12, 1, 0, 0);
|
|
glRotatef(6, 0, 1, 0);
|
|
glRotatef(3, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.297948 , 0.0218686 , -0.0273669 , 0 ,
|
|
-0.0312296 , 0.585402 , 0.127787 , 0 ,
|
|
0.0313586 , -0.0620319 , 0.291837 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.297948 , 0.0218686 , -0.0273669 , 0 ,
|
|
-0.0312296 , 0.585402 , 0.127787 , 0 ,
|
|
0.0313586 , -0.0620319 , 0.291837 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(24, 1, 0, 0);
|
|
glRotatef(12, 0, 1, 0);
|
|
glRotatef(6, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.291837 , 0.0538781 , -0.0439142 , 0 ,
|
|
-0.0613466 , 0.539821 , 0.254618 , 0 ,
|
|
0.0623736 , -0.119355 , 0.268075 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.291837 , 0.0538781 , -0.0439142 , 0 ,
|
|
-0.0613466 , 0.539821 , 0.254618 , 0 ,
|
|
0.0623736 , -0.119355 , 0.268075 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(36, 1, 0, 0);
|
|
glRotatef(18, 0, 1, 0);
|
|
glRotatef(9, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.281804 , 0.0917874 , -0.0464917 , 0 ,
|
|
-0.0892669 , 0.462386 , 0.371795 , 0 ,
|
|
0.0927052 , -0.167705 , 0.230826 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.281804 , 0.0917874 , -0.0464917 , 0 ,
|
|
-0.0892669 , 0.462386 , 0.371795 , 0 ,
|
|
0.0927052 , -0.167705 , 0.230826 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(48, 1, 0, 0);
|
|
glRotatef(24, 0, 1, 0);
|
|
glRotatef(12, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.268075 , 0.130434 , -0.0335112 , 0 ,
|
|
-0.113962 , 0.354998 , 0.470095 , 0 ,
|
|
0.122021 , -0.203669 , 0.183384 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.268075 , 0.130434 , -0.0335112 , 0 ,
|
|
-0.113962 , 0.354998 , 0.470095 , 0 ,
|
|
0.122021 , -0.203669 , 0.183384 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(60, 1, 0, 0);
|
|
glRotatef(30, 0, 1, 0);
|
|
glRotatef(15, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.250955 , 0.1643 , -0.00520123, 0 ,
|
|
-0.134486 , 0.222534 , 0.540733 , 0 ,
|
|
0.15 , -0.225 , 0.129904 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.250955 , 0.1643 , -0.00520123, 0 ,
|
|
-0.134486 , 0.222534 , 0.540733 , 0 ,
|
|
0.15 , -0.225 , 0.129904 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(72, 1, 0, 0);
|
|
glRotatef(36, 0, 1, 0);
|
|
glRotatef(18, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glGetFloatv(GL_MODELVIEW_MATRIX, 0x000000007fffad68);
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0.8, 0, 0, 1});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_FALSE);
|
|
glEnable(GL_BLEND);
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
5.499 , 0 , 0 , 0 ,
|
|
-2 , 1.499 , -2 , -1 ,
|
|
0 , 0 , 5.499 , 0 ,
|
|
-2.998 , -5.996 , -2.998 , 4
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.230826 , 0.188145 , 0.0363442 , 0 ,
|
|
-0.15 , 0.072688 , 0.576383 , 0 ,
|
|
0.176336 , -0.230826 , 0.075 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glMultMatrixf({
|
|
2.899 , 0 , 0 , 0 ,
|
|
0 , 2.899 , 0 , 0 ,
|
|
-2 , -4 , 0.899 , -1 ,
|
|
-1.798 , -3.596 , -1.798 , 2
|
|
});
|
|
glTranslatef(0, 0, 2);
|
|
glMultMatrixf({
|
|
0.230826 , 0.188145 , 0.0363442 , 0 ,
|
|
-0.15 , 0.072688 , 0.576383 , 0 ,
|
|
0.176336 , -0.230826 , 0.075 , 0 ,
|
|
0 , 0.2 , -2 , 1
|
|
});
|
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, {0, 0, 0, 0.4});
|
|
glNormal3fv({-1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({1, 0, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, -1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 1, 0});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, -1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({-1, -1, -1, 1});
|
|
glVertex4fv({-1, 1, -1, 1});
|
|
glVertex4fv({1, 1, -1, 1});
|
|
glVertex4fv({1, -1, -1, 1});
|
|
glEnd();
|
|
glNormal3fv({0, 0, 1});
|
|
glBegin(GL_POLYGON);
|
|
glVertex4fv({1, 1, 1, 1});
|
|
glVertex4fv({-1, 1, 1, 1});
|
|
glVertex4fv({-1, -1, 1, 1});
|
|
glVertex4fv({1, -1, 1, 1});
|
|
glEnd();
|
|
glPopMatrix();
|
|
glDepthMask(GL_TRUE);
|
|
glDisable(GL_BLEND);
|
|
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
|
glPushMatrix();
|
|
glTranslatef(0, -1.5, 0);
|
|
glRotatef(-90, 1, 0, 0);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0, -0.9);
|
|
glScalef(2, 2, 2);
|
|
glCallList(1);
|
|
glPopMatrix();
|
|
glPushMatrix();
|
|
glTranslatef(0, 0.2, 0);
|
|
glScalef(0.3, 0.3, 0.3);
|
|
glRotatef(84, 1, 0, 0);
|
|
glRotatef(42, 0, 1, 0);
|
|
glRotatef(21, 0, 0, 1);
|
|
glScalef(1, 2, 1);
|
|
glsEndGLS();
|