I’ve been trying to find the solution on this problem, but i’m tired reading all this posts.
So here it is. I’m new to Linux, Qt and OpenGL. We are writing a game, Qt has some problems with flickering on it’s Canvas. So i’ve desided to rewrite some part under OpenGL. But once again i’ve got the same problem.
Please, please. Tell me how to sync buffer swapping with monitors raytrace.
Long time ago, when i was interested in writing my own 3D Engine without OGL or D3D i used some assembler code. But this case is different
You shouldn’t have to do anything. The “swap buffers” call (which is not technically part of OpenGL, but the windows system dependent implementation code) ought to handle any sync to the monitor’s refresh rate. If it isn’t… well, maybe you can find another function? Otherwise, there’s nothing you can do except wish for a better OpenGL implementation.
Speaking of OpenGL implementations, what card and drivers are you using?
You need your swap to wait for the video to hit it’s vertical blank period where the display device ‘isn’t looking’ and during this period you can swap the buffer contents with no tearing.
These are system configuration settings but some drivers allow software control using the extension.
I’m using ATi Radeon 9500, but the tsrget platform is VIA KM400 integreated graphics. And the driver is FireGL 4.0.4 for Xorg ( could be mistake in driver version )
Unfortunatly Qt disables extensions, to make it crossplatform. But I don’t need it I’ll try to use GLX.
Thanks a lot! Now I’m know the right direction to follow
You mean some driver flag? Perhaps, but it would be more useful to be able initiating this mode from code. Anyway it’s may work. I’ll try to find it.
Tried to use glXGetVideoSyncSGI(…) and glXWaitVideoSyncSGI(…), but it didn’t worked. glXGetVideoSyncSGI(…) returns the same value all the time, but it should be an raycycles iterator. Both function returned success code. :-/
Any ideas?