Skip to content

Setting for enabling and disabling VSync #36

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

Open
NogginBops opened this issue Oct 10, 2023 · 2 comments
Open

Setting for enabling and disabling VSync #36

NogginBops opened this issue Oct 10, 2023 · 2 comments
Labels
4.0 enhancement New feature or request
Milestone

Comments

@NogginBops
Copy link
Member

Currently GLControl doesn't allow you to set VSync, we should try and expose this setting.

As of writing I don't know the detains on how NativeWindow and the Control is being "kept in sync" so I don't know if some sorcery is needed for this to properly work.

@NogginBops NogginBops added enhancement New feature or request 4.0 labels Oct 10, 2023
@NogginBops NogginBops added this to the 4.0 milestone Oct 10, 2023
@Dragorn421
Copy link

Is there a workaround or anything to use VSync in an OpenTK 4 GLControl?

The OpenTK 3 implementation for VSync sets Context.SwapInterval:

https://github.com/opentk/opentk/blob/3.x/src/OpenTK.GLControl/GLControl.cs#L452

Context.SwapInterval is also a thing in OpenTK 4, could supporting a VSync property in OpenTK 4 be as simple as porting the same logic from OpenTK 3 to OpenTK 4?

@NogginBops
Copy link
Member Author

It's likely not as simple as in OpenTK 4 we are running a separate window from the WinForms windows. But it could turn out to be that simple, so it's worth a try.

I haven't had the time to look into this issue. If you have any questions about trying to solve the issue yourself I'll try and answer any questions to the best of my knowledge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants