PDA

View Full Version : About glutPostRedisplay()



ksharma
04-16-2004, 08:13 PM
Hello,

I'm making a simple program in OpenGL that displays a quad. I have idle function that increments a global "time" variable so that I can alter my model as time progresses to create a sort of animation effect.

void idle()
{
time += 0.01f;
glutPostRedisplay();
}

But the problem is that as soon as this glutPostRedisplay is called my model disappears instantly and screen turns out to be black. Any clues why ?

The same problem appears if I just resize my window i.e. maximize it. Why this redrawing problem any idea ?

~ Thanks in advance

dslprog
04-16-2004, 11:55 PM
You should post your Display function here to make sure what it actually does.