-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
performance: unnecessary window.makeCurrent() in LWJGL3 backend #7360
Comments
Good catch! I think |
Yes, setting Edit: Alternatively, the context switch in I don't have a fork. As these are just a few lines it would probably be easier if someone else pushes/PRs this. |
you can edit file and submit a PR automatically using the github interface, go on the file, then click edit, it'll do the work for you |
I opened a PR: #7362 |
Taken care of by #7362. |
Please ensure you have given all the following requested information in your report.
Issue details
In the main loop of a Lwjgl3Application there is a loop which iterates over all Lwjgl3Windows and calls window.makeCurrent() which triggers an OpenGL context switch using glfwMakeContextCurrent(). This is unnecessary to call repeatedly when there is only one single window. Optimizing this will cause my application to run around 10% faster.
I suggest a simple change:
This is sufficient because currentWindow is null initially. So glfwMakeContextCurrent() will be called at least once.
Please select the affected platforms
The text was updated successfully, but these errors were encountered: