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

example/spriteshd: vsync doesn't work on Windows #1363

Closed
chengxuge opened this issue Sep 22, 2020 · 19 comments
Closed

example/spriteshd: vsync doesn't work on Windows #1363

chengxuge opened this issue Sep 22, 2020 · 19 comments

Comments

@chengxuge
Copy link

In full-screen mode, mac and windows fps performance is inconsistent, mac stable at 60 frames, windows can reach 1600 frames.

@chengxuge
Copy link
Author

chengxuge commented Sep 22, 2020

Isn't vsync not set to be consistent? I haven't changed.
demo:examples/spriteshd

@hajimehoshi
Copy link
Owner

This can be an environment where vsync doesn't work with the fullscreen mode. What about the other applications?

@chengxuge
Copy link
Author

Just vsync initialization, under windows full screen, not true.

@hajimehoshi
Copy link
Owner

I don't understand. Did you run the other fullscreen application? Did vsync work in this case?

@chengxuge
Copy link
Author

demo: examples/spriteshd.
Run under windows and mac, respectively, this is a full-screen program, but vsync in 2 operating systems, inconsistent, window program for the time being no problem.

@chengxuge
Copy link
Author

Windows full screen, vsync is not the default true.

@hajimehoshi
Copy link
Owner

I meant I'd like you to try other applications than ebiten.

@chengxuge
Copy link
Author

But ebiten vsync defaults to true, why is it inconsistent under windows fullScreen?

@hajimehoshi
Copy link
Owner

What I want to know is whether vsync works in fullscreen mode in your environment with any applications or not. I'd like to know this is an Ebiten-specific issue or not.

@hajimehoshi
Copy link
Owner

At least in my Windows environments (Vaio Z Canvas and Parallels VM), vsync works as expected.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 22, 2020

At least in my Windows environments (Vaio Z Canvas and Parallels VM), vsync works as expected.

Now I've confirmed examples/spritehd's FPS is higher than expected. Let me investigate.

But ebiten vsync defaults to true, why is it inconsistent under windows fullScreen?

Again, this might be an Ebiten-specific issue or not. I want to know which.

@chengxuge
Copy link
Author

Yes, it works, but in windows fullScreen mode, vsync behavior is not the default true.

@chengxuge
Copy link
Author

For the time being, I'll just ebiten.

@hajimehoshi hajimehoshi changed the title In full-screen mode, mac and windows fps performance is inconsistent, mac stable at 60 frames, windows can reach 1600 frames. example/spritehd: vsync doesn't work on Windows Sep 22, 2020
@hajimehoshi hajimehoshi added this to the v1.12.0 milestone Sep 22, 2020
@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 22, 2020

I've confirmed this issue with examples/spriteshd anyway. I'll investigate this. Thank you.

@hajimehoshi
Copy link
Owner

Related to #375

@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 22, 2020

glfw/glfw#1072

Apparently this is an issue in GLFW. No workaround here unfortunately.

EDIT: The workaround might be to make the window fullscreen with a little delay. Let me try.

@hajimehoshi hajimehoshi changed the title example/spritehd: vsync doesn't work on Windows example/spriteshd: vsync doesn't work on Windows Sep 22, 2020
@hajimehoshi
Copy link
Owner

The interesting thing is that examples/windowsize with -fullscreen flag doesn't cause this issue. Then, there should be a hack or a workaround.

@chengxuge
Copy link
Author

Call ebiten.SetVsyncEnabled in update, can return to normal, I updated the latest driver, examples/spriteshd vsync, not the default behavior.

@hajimehoshi
Copy link
Owner

I think this is fixed. Thank you!

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

No branches or pull requests

2 participants