I have a little problem.Sometimes when i move in the OpenGL scene,it just freezes for about 1-2 seconds and continues again.
If I put a Sleep(10); this doesn’t seem to happen,but without it it just stops,and then continues.
I’m using wgl on windows 7 x64
while(1)
{
while(PeekMessage(&msgWindow,0,0,0,PM_REMOVE))
{
if(msgWindow.message == WM_QUIT)
goto exit;
TranslateMessage(&msgWindow);
DispatchMessage(&msgWindow);
}
//RenderCode Here....
glFlush();
SwapBuffers(hDC);
Sleep(10);
This is the message loop.I think that it may cause the problem