Opengl obracajacy sie szescian

witam napisałem program za pomocą biblioteki opengl, jest to sześcian który powinien być przesunięty o 5 wzdłuż osi x i obracać się wokół osi z. kwadrat nie wiem czemu się nie przesuwa i nie obraca, mógłbym prosić o zerknięcie i o ewentualne uwagi?? wstawiam kod programu

#include 


const int w = 800;

const int h = 600;

const float delta_alfa=0.5;

float alfa=0.0;


void uklad(){

	glBegin(GL_LINES);

    glColor3f(0.0, 1.0, 0.0); //zielona os X

      glVertex3f(-5.0, 0.0, 0.0);

      glVertex3f(5.0, 0.0, 0.0);

      glColor3f(0.0, 0.0, 1.0); // niebieska os Y

      glVertex3f(0.0, -5.0, 0.0);

      glVertex3f(0.0, 5.0, 0.0);

      glColor3f(1.0, 1.0, 1.0); // biala os Z

      glVertex3f(0.0, 0.0, -5.0);

      glVertex3f(0.0, 0.0, 5.0);

    glEnd();

}


void sciana(){

    glBegin(GL_QUADS);

      glVertex3f(-0.5, 0.0, -0.5);

      glVertex3f (-0.5, 0.0, 0.5);

      glVertex3f(0.5, 0.0, 0.5);

      glVertex3f(0.5, 0.0, -0.5);

    glEnd();

}


void szescian(){


	//dolna podstawa

	glPushMatrix();

	glLoadIdentity();

	  glTranslatef(0.0, -0.5, 0.0);

	  glColor3f(0.0, 0.0, 1.0);

	  sciana();

	glPopMatrix();


	//gorna podstawa

	glPushMatrix();

	glLoadIdentity();

	  glTranslatef(0.0, 0.5, 0.0);

	  glColor3f(0.0, 1.0, 0.0);

	  sciana();

	glPopMatrix();


	//lewa sciana

	glPushMatrix();

	glLoadIdentity();

	  glColor3f(1.0, 0.0, 0.0);

	  glTranslatef(-0.5, 0.0, 0.0);

	  glRotatef(90.0, 0.0, 1.0, 0.0);

	  glRotatef(90.0, 1.0, 0.0, 0.0);

	  sciana();

	glPopMatrix();


	//prawa sciana

	glPushMatrix();

	glLoadIdentity();

	  glColor3f(0.0, 1.0, 1.0);

	  glTranslatef(0.5, 0.0, 0.0);

	  glRotatef(90.0, 0.0, 1.0, 0.0);

	  glRotatef(90.0, 1.0, 0.0, 0.0);

	  sciana();

	glPopMatrix();


	//tylna sciana

	glPushMatrix();

	glLoadIdentity();

	  glColor3f(1.0, 1.0, 0.0);

	  glTranslatef(0.0, 0.0, -0.5);

	  glRotatef(90.0, 1.0, 0.0, 0.0);

	  sciana();

	glPopMatrix();


	//przednia sciana

	glPushMatrix();

	glLoadIdentity();

	  glColor3f(1.0, 1.0, 1.0);

	  glTranslatef(0.0, 0.0, 0.5);

	  glRotatef(90.0, 1.0, 0.0, 0.0);

	  sciana();

	glPopMatrix();


}


void anim(){

	alfa+=delta_alfa;

    glutPostRedisplay();

}


void init(){

    glClearColor(0.0, 0.0, 0.0, 1.0);

	glEnable(GL_DEPTH_TEST);

	glMatrixMode(GL_PROJECTION);

	gluPerspective(60.0,1.0,1.0,20.0);

	gluLookAt(7.0,7.0,5.0, 0.0,0.0,0.0, 0.0,0.0,1.0);

	glMatrixMode(GL_MODELVIEW);

}


void drawScene(void) {

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	glLoadIdentity();

	  uklad();

	  glRotatef(alfa, 1.0, 0.0, 0.0);

	  glTranslatef(5.0, 0.0, 0.0);

	  szescian();

    glFlush();

    glutSwapBuffers();

}


int main (int argc , char **argv) {

	glutInit(&argc , argv);

    glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);

    glutInitWindowSize(w, h);

    glutCreateWindow ("szescian animacja w GLUT");

    glutIdleFunc(anim);

    glutDisplayFunc(drawScene);

    init();

    glutMainLoop();

    return 0;

}

witam

Widziałem podobny przykład na tej stronie http://www.developer.nokia.com/Communit … GL_with_Qt

Może to ci pomoże

Serdecznie Pozdrawiam

Grześ