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

Provide a Way to Create a NativeWidget From a Raw Window Handle #60

Open
zicklag opened this issue Mar 1, 2020 · 2 comments
Open

Provide a Way to Create a NativeWidget From a Raw Window Handle #60

zicklag opened this issue Mar 1, 2020 · 2 comments

Comments

@zicklag
Copy link

zicklag commented Mar 1, 2020

Would you be open to a PR for a NativeWidget::from_raw_window_handle that could take a &impl HasRawWindowHandle.

It would essentially be an alternative to NativeWidget::from_winit_window.


I'm trying to get surfman to work for creating contexts and surfaces for gfx-backend-gl ( discussion here: gfx-rs/gfx#3151. I haven't gotten the surfman code pushed yet ). I was going to put the code right in gfx-backend-gl, but I thought that it could be useful to others if it was included in surfman.

@pcwalton
Copy link
Owner

pcwalton commented Mar 3, 2020

Seems OK as long as it's behind a non-default feature flag.

@zicklag
Copy link
Author

zicklag commented Mar 3, 2020

Cool. In #61 I put it behind the sm-raw-window-handle feature.

I think that PR is almost much ready, but I've only tested on X11, and I'm not 100% sure its working yet because I haven't run an example that actually displays anything yet.

Oh, and there was some stuff I didn't know how to do to get the window size from the wayland raw window handle so that still needs fixing.

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 a pull request may close this issue.

2 participants