forcing a re-render whilst not in focus

Started by
2 comments, last by biggoron 15 years, 12 months ago
Hey guys, I've got an application that uses openGL to display a picture. Another window is then used to toggle what should be displayed. So i update a variable in the main execution loop and put an if else statement to tell it what to render - acts like a toggle. However I've noticed that the display doesn't get updated unless the window is in focus, or i hover my mouse of it. I there a way to forcefully redraw the window? I've put a printf statement in the main glut loop only to find that its not actually been called until the window is back in focus from a glutPostRedisplay() [Edited by - chippiejnr on April 23, 2008 10:40:45 AM]
Advertisement
Put glutPostRedisplay in your IdleFunc?
Holy crap I started a blog - http://unobvious.typepad.com/
But surely that will keep refreshing the window even if its not dirty?
glutVisibilityFunc perhaps. It will tell your if your window is exposed or covered.

This topic is closed to new replies.

Advertisement