OK, my GLUT display func looks like this:
void display (void)
{
i = i + 0.05;
if (i > 360) i = 0;
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f (red, green, blue);
glPushMatrix ();
glLoadIdentity();
glRotatef (spin, 1.0, 1.0, 0.1);
glBegin(GL_QUADS);
glColor3f (red, green, blue);
glVertex3f (g, g, g);
glVertex3f (g, -g, g);
glVertex3f (-g, -g, g);
glVertex3f (-g, g, g);
glColor3f (0.0, 0.0, 1.0);
glVertex3f (g, g, -g);
glVertex3f (g, -g, -g);
glVertex3f (-g, -g, -g);
glVertex3f (-g, g, -g);
glColor3f (0.0, 1.0, 0.0);
glVertex3f (g, g, g);
glVertex3f (g, g, -g);
glVertex3f (-g, g, -g);
glVertex3f (-g, g, g);
glColor3f (1.0, 0.0, 0.0);
glVertex3f (g, -g, g);
glVertex3f (g, -g, -g);
glVertex3f (-g, -g, -g);
glVertex3f (-g, -g, g);
glColor3f (1.0, 0.0, 1.0);
glVertex3f (g, g, g);
glVertex3f (g, g, -g);
glVertex3f (g, -g, -g);
glVertex3f (g, -g, g);
glColor3f (1.0, 1.0, 0.0);
glVertex3f (-g, g, g);
glVertex3f (-g, g, -g);
glVertex3f (-g, -g, -g);
glVertex3f (-g, -g, g);
glEnd;
//***** glutWireCube (0.1*g);
glPopMatrix();
glutSwapBuffers();
glFlush();
}
As you might have noticed, this is supposed to rotate a multi-colored cube by the spin-angle around the axis 1.0|1.0|.1.
So, when I leave the glutWireCube call at the end of the func excluded, the cube refuses to move, somehow; when I activate the wirecube, the call causes an Invalid Operation error, but the cube rotates properly…
So, where’s the problem supposed to be?
I cant see it, so any help is appreciated!!
Thanx in advance!
The_V|k|ng