Refresh Issue in Opengl Window


I have a opengl window refreshing problem. When I run my program, I cannot see the scene clearly.
The scene looks like as if you are looking the monitor with a camera, you can see the black lines falling down fast on the window. I am trying to use loops to slow it down, but I believe there should be a solution for that

Waiting your help guys

use double buffering. How to do that depends on how you create your OpenGL window and what is the API you use.

I use double buffering in my game, but it’s not enough to get rid of black lines completely. You can’t see it in the game but in menus I was having multiple short black vertical lines - 1 pixel of height and about 300-400 pixels in width.
It looked like graphics card stopped displaying picture for a few microseconds during frame switch.
The solution was to use vsync or just decreasing the framerate (drawing menus on 7800GT is just so fast :smiley: ) by adding Sleep(5) at the end of each frame when not rendering anything complex.