View Full Version : Elliminating Flicker
10-06-2003, 09:47 AM
I'm having trouble getting rid of some annoying flicker. I am using an off-screen contex to render my scene as follows:
...which should get rid of the flicker. But it doesn't.
Could it be because I need to optimise my 'drawWorld' method?
Make sure you're requesting double-buffer at GL context creation.
10-06-2003, 12:14 PM
Yeah, it's definitly turned on as I turned it off and experienced real flicker http://www.opengl.org/discussion_boards/ubb/smile.gif
It seems to happen when I push a key to move the camera.. the whole openGL window flashes grey for a milisecond before the image is drawn.
Any ideas anyone?
Perhaps you're doing more than you should when you press a key. If there's no flicker while you're not pressing a key (assuming your animation continues running with no keys being pressed), then that might be it.
Otherwise, it could be that you are no syncing your refresh with the VBL update.
10-06-2003, 02:39 PM
Thanls! I think that may be the cause of the problem...
I'll invesigate it after some sleep http://www.opengl.org/discussion_boards/ubb/smile.gif
flash grey.. that seem like the erasebkgnd message of the window isnt intecepted and that clears the window with the standard button color ( in windows its often grey)
10-07-2003, 05:36 AM
I figured it out..
After my onKeyPress() event I was calling Invalidate(). This had the effect of greying out the whole window as it invalidated the window content.
I should really have been calling FormPaint(Sender);
Thanks for your help! You were both kindof right in your own ways http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.