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

Turning off vertical sync doesn't have any effect #63

Open
hanspacket opened this issue Jan 18, 2022 · 3 comments
Open

Turning off vertical sync doesn't have any effect #63

hanspacket opened this issue Jan 18, 2022 · 3 comments
Labels
3.0 bug Something isn't working

Comments

@hanspacket
Copy link

During some prototyping work, I wanted to compare the performance of GLWpfControl with my current approach for rendering OpenGL content in WPF. I would basically like to measure which approach has the biggest performance overhead. My intent is to open a large window, and compare framerates for both approaches. I don't want to add too much actual content so that the performance overhead is more prominent, so I'm painting a fairly lightweight scene using OpenGL.

This means that I end up with high framerates, even for fairly large windows (3840x1080 in my case, I can't seem to go beyond this size). To get proper FPS results, I disabled Vertical Sync in the NVidia control panel. This has the following effect:

  • In the old approach, the framerate is not capped to 60 FPS anymore, and I get framerates of ~250
  • Using GLWpfControl, the framerate remains capped at 60 FPS.

The second point is a bit unexpected for me since I didn't see anything in the GLWpfControl source code that indicates a fixed framerate. I might be wrong though.

Is this a bug ?
Is this a normal side-effect of the DirectX-OpenGL interop in GLWpfControl ?
Is the framerate capping something I can enable or disable some other way ?

Note that I'm using OpenTK.GLWpfControl version 3.3.0 since I'm using .Net Framework.

@NogginBops NogginBops added bug Something isn't working 3.0 labels Mar 20, 2022
@NogginBops
Copy link
Member

It does seem weird that the framerate is limited.
This might have something to do with the DX-OpenGL interop, but I'm not sure.
I'm not sure when I'll be able to look into this, especially the 3.3.0 version but I'll keep it on my todo.

@nasser225
Copy link

Hi @NogginBops , did you get anywhere with this? I am experiencing the same issue - 60FPS limited using GLWpfControl 4.1.0

@NogginBops
Copy link
Member

I've not gotten to this issue yet. I'm planning a refactor of the DX interop part of this control and while doing that I can look into what the issue is here with vsync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants