Hi all:
I configured my opengl like the following:
void init(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0); // Set display-window color to white.
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); // display objects as wireframe
glutIdleFunc(aniDisplay);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
glMatrixMode(GL_PROJECTION);
glFrustum(-100, 100, -100, 100, 100, 1000);
glMatrixMode(GL_MODELVIEW);
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.0, 1.0, 0.0);
glPushMatrix();
.............// code for drawing pictures
glPopMatrix();
glFlush();
glutSwapBuffers();
}
void aniDisplay(){
EulerStep(0.001); glutPostRedisplay();
}
This is my configurations. I used double buffer but it is still flickering. Does anybody know how to fix the problem please?
Thanks a lot!!!