what did I do wrong? theese are just 2 quads which should rotate around the y-axis. but always the second (the red one) is in the foreground. here’s the code…
void Scene1::Render()
{
glClear(GL_COLOR_BUFFER_BIT |GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glRotatef(Angle, 0, 1, 0);
Angle += 1.0f;
if (Angle == 360.0f) Angle =0.0f;
glBegin(GL_QUADS);
glNormal3f(0.0f, 0.0f, -0.5f);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3f(-0.5f, +0.5f, -0.5f);
glVertex3f(+0.5f, +0.5f, -0.5f);
glVertex3f(+0.5f, -0.5f, -0.5f);
glVertex3f(-0.5f, -0.5f, -0.5f);
glEnd();
glBegin(GL_QUADS);
glNormal3f(0.0f, 0.0f, +0.5f);
glColor3f(1.0f, 0.0f, 0.0f);
glVertex3f(-0.5f, +0.5f, +0.5f);
glVertex3f(+0.5f, +0.5f, +0.5f);
glVertex3f(+0.5f, -0.5f, +0.5f);
glVertex3f(-0.5f, -0.5f, +0.5f);
glEnd();
return;
}
and I can’t move the camera with glTranslatef in any z-direction…
can you help me?
g.h.
[This message has been edited by hollowcoder (edited 08-30-2002).]