From: Brian P. <br...@tu...> - 2003-06-05 22:55:26
|
Felix K=FChling wrote: > Hi, >=20 > even with LIBGL_SYNC_REFRESH I get bad tearing with quake2. I looked > into the source a bit and now I'm scratching my head about this > question: Does waiting for a vblank do anything useful if you havn't > flushed the 3D hardware graphics pipeline before? I believe the driver > should call something equivalent to glFinish before driWaitForVBlank if > LIBGL_SYNC_REFRESH is set. >=20 > Further in case of a non-zero swap interval you will throttle the frame > rate but there is no guarantee that the swap will occur during a retrac= e > if the application or the driver havn't called glFinish. I guess > applications explicitly using swap intervals are aware of that. But > LIBGL_SYNC_REFRESH is supposed to work for applications that don't even > know they are waiting for a vblank. So the driver should call glFinish > for them. >=20 > I hope I'm not completely off with my theories ;-) When glXSwapBuffers is called, the rendering context currently bound=20 to the window (if any) is flushed (ala glFinish) automatically. Then,=20 glXSwapBuffers should wait for the end of the screen refresh before=20 swapping. That said, I don't know why you're seeing tearing. -Brian |