• Advertisement
Sign in to follow this  

Blocked SwapBuffers

This topic is 1446 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement