-
Notifications
You must be signed in to change notification settings - Fork 476
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
Support for raw-window-handle #962
Conversation
Can you add a test, or an example, so that we can check it works on every platform? Also, a mention of this feature in the README would be appreciated. People have no way to know there is such a feature unless they manually look in the Cargo.toml. |
@Cobrand I've adding tests for each platform and an example working with wgpu. I had to add a few test dependencies to get the example going, though. Let me know what you think! |
I'd gladly merge this but the example and the test don't compile on my machine on linux. Here is the error message:
Looks like the |
I'm not sure what's wrong. I was able to get the example to compile with no issues on clean ubuntu and arch installs. What distro are you using? |
I'm using archlinux, but that should be irrelevant. I tried deleting my Cargo.lock, and this time I got this error, which comes from the example:
A conditional import should do the trick here. |
Bah, I've been burned by IDE auto-imports before. I moved it to where it's actually used. |
I got a panic inside the wgpu lib now:
I think it's unrelated to this PR (or at least your PR isn't the cause) and I'm ready to merge this, but I just wanted to confirm this with you first. |
if that's on mac that's expected |
@Lokathor Still on arch. I have a laptop with bumblebee so that might be an issue, regardless I ran the test both without and with optirun, and in both cases I got the panic. |
I have the same problem on arch. Doesn't look like wgpu is able to figure out the graphics device, though that could be because this is some pretty old hardware. |
Regardless, it's seems to be an upstream issue and wgpu is only a dev dependency for a specific example, so I think it's safe to merge. Even if it's an issue, no one is using it anyway (for now, since it's not even released), and they can always file an issue then. |
Support for raw-window-handle
Taking off from #910: @Lokathor provided some system-specific bindings and I've plucked out the necessary stuff to make this run on macOS, linux, and windows. This definitely runs on macOS, but I was unable to procure linux and windows machines to verify support there. I'm confident it "should work", though.