Forcing GL to draw

Hi everybody!

Problem: I have some heavy computation on geometric data and want the intermediate results to be displayed. During the computation i cannot call glutPostRedisplay because this has only effect in the next iteration through glutMainLoop. But that iteration will be after the computations are done. So I tried calling the display method directly which sometimes works (when the comptations are not so demanding on the CPU) and sometimes doesn’t. Is there an elegant solution to this problem?

Thanks for your help!

if i understand you: glFlush

if you are using glut: all rendering functions in glutDisplayFunc