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

fix: avoid unnecessary window.makeCurrent() calls #7362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

McMurat
Copy link

@McMurat McMurat commented Mar 10, 2024

This fixes the issue as discussed here

Copy link
Member

@tommyettinger tommyettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just commenting to try to bring some eyes to this; I don't personally feel like I can adequately review the code for correctness. I can review it for performance in a little while. I've had my suspicions about LWJGL3 not running as fast as it could for a while, but it's hard to compare different versions for speed. GL30 is much slower than GL20 on my machine, when using LWJGL3, which is odd, but I'm not sure if that's related to this.

@crykn crykn added this to the 1.12.3 milestone Apr 20, 2024
@casid
Copy link
Contributor

casid commented May 14, 2024

I tried this patch with my game on windows and on mac.

It worked on both and subjectively the game felt a little smoother than before.

I have vsync activated and I'm profiling how long rendering the scene takes. Before the patch, on windows the rendering took a few us, now it takes roughly 16ms. Seems like this change made vsync work properly. On mac on the other hand no changes after the patch, rendering is still a few us.

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.

None yet

4 participants