opengl ,计算机图形学代码,计算机图形,大学课程
glPushMatrix();
glColor3f(1,0,0);
//your code here;
glScalef(4,4,0.5);
glutSolidCube(1); //绘制立方体身 glPopMatrix();
glPushMatrix();
glColor3f(1,1,0);
//your code here;
glRotatef(thera,0,1,0);
glTranslatef(0,2.5,0);
glScalef(1,1,0.5);
glutSolidCube(1); //绘制立方体头 glPopMatrix();
glPushMatrix();
glColor3f(1,0.5,0.2);
//your code here;