Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsync not determined by sdl correctly? #1731

Open
jobf opened this issue Dec 9, 2023 · 0 comments
Open

vsync not determined by sdl correctly? #1731

jobf opened this issue Dec 9, 2023 · 0 comments

Comments

@jobf
Copy link
Contributor

jobf commented Dec 9, 2023

I'm testing with lime 8.1.1

When I enable vsync in the project.xml it seems to be ignored for hashlink or linux native builds, e.g.

<window width="800" height="600" vsync="true"/>

My display refresh rate is 59.93 hz so with vsync true I'd expect to see deltaTime in the update function fluctuate around 15 or 16 ms on average, however it's more like 32 or 33 ms.

The way I am testing this is as follows, in a class which extends lime.app.Application

override function update(deltaTime: Int): Void
{
    trace(deltaTime);
}

I understand that for web builds, the update rate is determined by window.requestAnimationFrame() which is already using vsync rate, and can confirm that if I build for web I do see deltaTime traces fluctuate around 15 or 16 ms on average. So perhaps this only relates to the SDL backend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant