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

Allow context sharing for headless contexts on MacOS #1333

Closed
wants to merge 2 commits into from

Conversation

bschwind
Copy link

@bschwind bschwind commented Oct 13, 2020

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

Original issue: #899

This was originally implemented in #1132, however sharing support was never added for headless contexts. This is essentially the same change as before, just in new_headless.

I tested this in a company application which uses multi-threaded OpenGL contexts with texture sharing, and this change fixed an issue I was having. However, in master before this change, cargo run --example sharing just showed a black screen. It also showed a black screen after this change, so I can't claim the example runs correctly. There's some other issue for MacOS at play for that.

@strohel
Copy link

strohel commented Sep 13, 2021

Hi, I've rebased the PR on current master, added a Changelog entry, and @bschwind was kind to test it on a Mac.

Could somebody with permissions please approve the CI run and consider merging this? Thanks!

@maroider
Copy link
Member

I don't have the means to test this myself, so I'd be merging partially blind right now.
As you said, @bschwind, the PR is pretty much identical to #1132, so I'd expect it to work based on that, but I'd really like more than one person to confirm that the fix works.

If either of @mcginty @xiaopengli89 could get a repro on the bug and fix (I see you two have given this PR a "👍"), then that would help soothe my worries.

CHANGELOG.md Outdated Show resolved Hide resolved
@strohel
Copy link

strohel commented Sep 13, 2021

Full disclosure: me, @bschwind and @mcginty work together in the same company (tonari).

@bschwind
Copy link
Author

bschwind commented Feb 4, 2022

Hi @maroider I've rebased on the latest master branch and can confirm this still works on MacOS, though I understand if you want others to test too.

@kchibisov
Copy link
Member

The context sharing is enabled on macOS, however headless was removed in some sense, but you can create a context without a window, so it might be fine?

@kchibisov kchibisov closed this Sep 3, 2022
@bschwind
Copy link
Author

bschwind commented Sep 3, 2022

@kchibisov I see things have changed a bit since I submitted this PR.

I'll test out shared contexts on MacOS when I get the chance. If I can create a context without a window, I think that will suffice for my usage.

Edit: Tested it out, context sharing seems to work well on MacOS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants