softbuffer icon indicating copy to clipboard operation
softbuffer copied to clipboard

Vertical sync

Open LoganDark opened this issue 3 years ago • 3 comments

Is it possible to perform vertical sync with this library? i.e. deliver a new frame to the screen every monitor refresh, but not any more frequently? It doesn't seem like the library does anything special about it, but I'm not 100% sure how this should work (is it the responsibility of the user to figure out the refresh rate and stuff?).

LoganDark avatar Nov 07 '22 17:11 LoganDark

Wayland should be able to implement this with frame callbacks.

i509VCB avatar Jan 01 '23 19:01 i509VCB

This would probably be better implemented in winit as an event sent to the event loop (https://github.com/rust-windowing/winit/issues/2412). We could make set_buffer block on the frame callback, which Mesa's eglSwapBuffers does when eglSwapInterval isn't zero. But that blocks indefinitely on an occluded window, and should at most be an option.

ids1024 avatar Jan 01 '23 19:01 ids1024