Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Blocked SwapBuffers

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Tommato   Members   

229
Like
0Likes
Like

Posted 06 February 2014 - 07:17 AM

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



#2 samoth   Members   

9646
Like
0Likes
Like

Posted 06 February 2014 - 08:18 AM

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.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.