{"action":"closed","issue":{"url":"https://api.github.com/repos/glfw/glfw/issues/569","labels_url":"https://api.github.com/repos/glfw/glfw/issues/569/labels{/name}","comments_url":"https://api.github.com/repos/glfw/glfw/issues/569/comments","events_url":"https://api.github.com/repos/glfw/glfw/issues/569/events","html_url":"https://github.com/glfw/glfw/issues/569","id":98288756,"number":569,"title":"Move glfwSwapBuffer sleep time.","user":{"login":"zgron","id":2778348,"avatar_url":"https://avatars.githubusercontent.com/u/2778348?v=3","gravatar_id":"","url":"https://api.github.com/users/zgron","html_url":"https://github.com/zgron","followers_url":"https://api.github.com/users/zgron/followers","following_url":"https://api.github.com/users/zgron/following{/other_user}","gists_url":"https://api.github.com/users/zgron/gists{/gist_id}","starred_url":"https://api.github.com/users/zgron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgron/subscriptions","organizations_url":"https://api.github.com/users/zgron/orgs","repos_url":"https://api.github.com/users/zgron/repos","events_url":"https://api.github.com/users/zgron/events{/privacy}","received_events_url":"https://api.github.com/users/zgron/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/glfw/glfw/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-30T23:57:00Z","updated_at":"2015-08-09T11:04:43Z","closed_at":"2015-08-09T11:04:43Z","body":"As I have noticed, if I'm not misstaken the glfwSwapBuffer puts the thread to sleep a certain time before it swaps the buffer to not exceed a certain refresh rate. However because of that my program now has a < 1/60 seconds delay between whiched rendering and actuall rendering, which causes moving stuff with the mouse to look very bad synced. However if the sleep would be put after the swap, to still make the whole loop fullfill the time needed for the refresh rate too be as it should. The rendering would be much more instant. I for myself added such a sleep behind the glfwSwapBuffer, so that the glfwSwapBuffer itself wouldn't have to sleep next time. The differens was tremendous and the experience from the mouse now appears to be almost instant: I just think such a future should be standarized. But maybe the sleep is something the monitor does and it is not possible to change that through glfw, which would mean people should just go along with my solution instead. "}}