PDA

View Full Version : Screen redraw



janey
03-24-2007, 03:22 AM
I am developing a simple application for a project I am working on. I have a glFlush(); and glutSwapBuffers(); at the end of my Draw() function.

However I notice that the screen does not always update unless i hover the mouse over it and move it.

Any ideas how I can set it to refresh more reliably? The object that I am trying to move over the screen will only move while the mouse is moving...

:(

UT666
03-24-2007, 03:35 AM
Since I see glut commands I guessing your doing this in a glut app.

Have you setup an idle function?

in your main():
glutIdleFunc(myidle);

and then define this:

void myidle(void)
{
glutPostRedisplay();
}

hope it helps,

ut.

janey
03-24-2007, 03:52 AM
Hey, thanks for the quick reply!

I will try adding that!