Blocked SwapBuffers

Started by
-1 comments, last by Tommato 10 years, 2 months ago

Hi All

In some cases aglSwapBuffers doesn't update screen. However when mouse pressed in window, it's updated without any re-render.
No luck with caatch update moment/call in debugger. For example if stop on breakpoint - screen is already updated, but if go step by step - not updated yet. In past a bit similar prob was solved with set AGL_SWAP_INTERVAL = 1, but now it has no effect.

I realize agl framework is totally obsolete but we need a refactoring to get rid of it, that is what I'm doing now.

Any idea?

Thx

Tommato

Advertisement

Generally, (agl|wgl|glx)SwapBuffers does not swap buffers (despite its name, which suggests that). It merely locks the back buffer (so subsequent attempts to modify it will block) and marks it to be swapped. When this really happens is finally up to the display driver or compositing window manager or whoever is in charge of the visible screen, and usually it happens at vertical blank.

Now apparently, your window manager can't be bothered for some reason, but it does when you click the mouse. So the logical "solution" seems to kick it with an explicit invalidation (setNeedsDisplay ?) of the window. It's not a terribly good solution, but it might just work.

This topic is closed to new replies.

Advertisement