static void redraw (void)
{
static float rotateBy=0;
int a,b;
unsigned int CurrentVert;
rotateBy+=1;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glTranslatef(0,0,-100);
glRotatef(rotateBy,1,0,0);
glBegin(GL_TRIANGLES);
for (a=0;a<4;++a)
{
for (b=0;b<3;++b)
{
CurrentVert=Pyramid.Tri[a].Ver[b];
glColor3fv(Pyramid.Ver[ CurrentVert ].col);
glVertex3fv(Pyramid.Ver[ CurrentVert ].pos);
}
}
glEnd;
glPopMatrix;
glutSwapBuffers;
glutPostRedisplay;
}
I THINK the problem is somewhere up in there, though I may be wrong… It compiles, but the window doesn’t display properly–It has the outline, but the inside looks exactly the same as the stuff behind it.