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

Better OpenGL performance and animation smoothness #295

Closed
wants to merge 1 commit into from

Conversation

vbousquet
Copy link
Contributor

This PR contains the change discussed in issue #283

There were 2 problems:

  • SharpGL implementation performs rendering in a FBO, then copy the FBO to the native window. This copy was somewhat inefficient, and the code did trigger a GC at each copy leading to poor performance. This is discussed here dwmkerr/sharpgl@c436fef and here FBORenderContextProvider optimization dwmkerr/sharpgl#145.
  • The other issue is that the implementation used a fixed rendering loop (timer based at a fixed framerate). The rendering frequency was not the one of the DMD source, leading to animation stuttering. This was not a performance problem but gave bad smoothness and lead to a perceptions of stutter and a feeling of a performance issue.

The PR change this by:

  • implementing our own OpenGLControl based on the proposed fix in the previous links,
  • modify rendering to be event based instead of render loop based, triggering a render each time a frame is submitted by the DMD source.

@vbousquet
Copy link
Contributor Author

Sorry, I was to fast. I will take a bit more time to prepare a clean PR with its own branch. Closing for the time being

@vbousquet vbousquet closed this May 11, 2021
@vbousquet vbousquet mentioned this pull request May 12, 2021
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

Successfully merging this pull request may close these issues.

1 participant