Hello,

I have a cube and do some transformations. I need to know the coordinates of the vertices so i use the "glGetFloatv (GL_MODELVIEW_MATRIX, matrix1)" where "matrix1" is a matrix with 16 positions of type GLfloat. My problem is that in "matrix1" i only see 5 values changing (those in positions 5,6,9,10,12) while i think there should be more because all the vertices change positions. Here is the code:

void Render(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
DrawCube();
glFlush();
glutSwapBuffers();
glutPostRedisplay();
}

void DrawCube()
{
glPushMatrix();
glTranslatef( translatecube, 0.0, 0.0 );
glRotatef( rotationcube, 1.0, 0.0, 0.0 );
glGetFloatv (GL_MODELVIEW_MATRIX, matrix1);

glBegin(GL_POLYGON); //sides of cube
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glVertex3f(....);
glEnd();

glPopMatrix();
translatecube=translatecube+0.005;
rotationcube=rotationcube+0.03;
}

Could someone explain to me why this happens?

Thank you