|
@@ -26,9 +26,13 @@ static void myinit(void) |
|
|
glClearColor(0.5, 0.5, 0.7, 0.0); |
|
|
glClearColor(0.5, 0.5, 0.7, 0.0); |
|
|
glColor3f(1.0, 1.0, 1.0); |
|
|
glColor3f(1.0, 1.0, 1.0); |
|
|
|
|
|
|
|
|
|
|
|
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); |
|
|
|
|
|
glDisable(GL_CULL_FACE); |
|
|
|
|
|
|
|
|
|
|
|
glShadeModel(GL_SMOOTH); |
|
|
|
|
|
glEnable(GL_BLEND); |
|
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
|
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
|
|
glEnable(GL_DEPTH_TEST); |
|
|
glEnable(GL_DEPTH_TEST); |
|
|
glShadeModel(GL_SMOOTH); |
|
|
|
|
|
|
|
|
|
|
|
setcamera(); |
|
|
setcamera(); |
|
|
|
|
|
|
|
@@ -70,7 +74,7 @@ static void reshape(int w, int h) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#define F(x) ((x)*1.01 - 0.005) |
|
|
#define F(x) ((x)*1.01 - 0.005) |
|
|
#define CP glColor4f(x0,y0,z0,0.5); glVertex3f(x0,y0,z0) |
|
|
|
|
|
|
|
|
#define CP glColor4f(x0,y0,z0,0.9); glVertex3f(x0,y0,z0) |
|
|
#define BP glColor3f(0.0,0.0,0.0); glVertex3f(F(x0),F(y0),F(z0)) |
|
|
#define BP glColor3f(0.0,0.0,0.0); glVertex3f(F(x0),F(y0),F(z0)) |
|
|
#define BLACK x0 = y0 = z0 = 0.0 |
|
|
#define BLACK x0 = y0 = z0 = 0.0 |
|
|
#define RED x0 = 1.0; y0 = z0 = 0.0 |
|
|
#define RED x0 = 1.0; y0 = z0 = 0.0 |
|
@@ -127,7 +131,7 @@ static void display(void) |
|
|
WHITE; BP; XRED; BP; |
|
|
WHITE; BP; XRED; BP; |
|
|
glEnd(); |
|
|
glEnd(); |
|
|
glTranslatef(.5, .5, .4); |
|
|
glTranslatef(.5, .5, .4); |
|
|
glColor4f(.5, .5, .5, .5); |
|
|
|
|
|
|
|
|
glColor4f(.2, .2, .2, .5); |
|
|
glBegin(GL_QUADS); |
|
|
glBegin(GL_QUADS); |
|
|
glVertex3f(0.891063,-0.45388,0); |
|
|
glVertex3f(0.891063,-0.45388,0); |
|
|
glVertex3f(0.0773943,0.151941,-0.985355); |
|
|
glVertex3f(0.0773943,0.151941,-0.985355); |
|
|