Closed acolwell closed 1 year ago
This pull breaks X11.
ifdef __NATRON_WAYLAND__
(https://github.com/NatronGitHub/Natron/blob/RB-2.5/Engine/OSGLContext.cpp#L426) - trivial fixThis pull breaks X11.
- threadHasACurrentContext returns false (https://github.com/NatronGitHub/Natron/blob/RB-2.5/Engine/OSGLContext.cpp#L306) - don't know (start Natron => add blur => fail)
- Missing
ifdef __NATRON_WAYLAND__
(https://github.com/NatronGitHub/Natron/blob/RB-2.5/Engine/OSGLContext.cpp#L426) - trivial fix
Sorry about this. I'll try to look into this today. I figured the assert might smoke out other issues.
No problem or rush :+1:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
PR Description
What type of PR is this? (Check one of the boxes below)
What does this pull request do?
This patch fixes 2 bugs where code was leaving a GL context current when it shouldn't have. This was causing rendering failures because code would later try to use a context that was current on one thread to do rendering on another.
This patch contains the following changes:
Have you tested your changes (if applicable)? If so, how?
Yes. I've verified that this fixes "random" rendering failures I was seeing on Windows. I also created a unit test that verifies the fixes and run them on Windows and Linux. I don't have a Mac dev environment to test with, but the test should detect the same bugs on that platform. I verified the new tests fail without the fixes and pass with them.