View Full Version : Problem Calling Repaint without using glutIdleFunc()
06-27-2001, 11:05 PM
I want to call repaint function only when there is change in the screen ,but right now i am using glutIdleFunc() which constantly calls the repaint function.This is hampering the performance of my application.Is there any better way of doing so?
What do you mean by 'change'?
glut will call your render function when
- your application gets expose events
- when it is reshaped (which triggers its own expose events, after all)
so you can safely NEVER have a glutPostRedisplay() and have your window repainted when needed.
However, if you mean yoru *scene* changes, then you'll need to keep track of that yourself and only call glutPostRedisplay in your idle func if you've moved geometry around.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.