void displayoutcome(struct Node *node){
    while(node){
        cube_display(node->cube);
        printf("^\n");
        printf("^\n");
        printf("^\n");
        node=node->prev;
    }
}
Пример #2
0
void display(void) {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glMatrixMode(GL_MODELVIEW);

    glLoadIdentity ();
    gluLookAt(0.0, 2.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);

    glPushMatrix();
    glRotatef(fLightRotateAngle0, 1.0, 0.0, 0.0);
    glRotatef(fLightRotateAngle1, 0.0, 1.0, 0.0);
    glLightfv(GL_LIGHT0, GL_POSITION, lPos);
    glPopMatrix();

    glRotatef(fRotateAngle0, 1.0, 0.0, 0.0);
    glRotatef(fRotateAngle1, 0.0, 1.0, 0.0);
    glTranslatef(0.0, -1.25, 0.0);

    cube_display();
    teapot_display();

    glFlush();
    glutSwapBuffers();
    glutPostRedisplay();
}