Skip to content

Raw window handle support instead of winit #301

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

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

kvark
Copy link
Member

@kvark kvark commented Aug 21, 2019

This removes winit and paves the way for gfx-rs/wgpu-rs#64

@kvark kvark force-pushed the raw-handle branch 3 times, most recently from 4529059 to fb1e74b Compare August 21, 2019 01:42
@grovesNL
Copy link
Collaborator

(tagging #295 because of the partial fix by specifying the / 4 for SPIR-V length)

rendy-memory = { version = "0.4" }
rendy-descriptor = { version = "0.4" }
parking_lot = "0.9"
raw-window-handle = "0.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically I guess somebody could prefer for this to be optional too, but it's probably fine to always require it

raw_window_handle::RawWindowHandle::IOS(h) =>
instance.create_surface_from_uiview(raw.ui_view, cfg!(debug_assertions)),
#[cfg(all(target_os = "ios", feature = "gfx-backend-metal"))]
raw_window_handle::RawWindowHandle::MacOS(h) =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we also want to support gfx-backend-vulkan on macOS? (I don't think we need to block the PR on this, but probably worth mentioning since we added it to gfx-hal)

WGPUSurfaceId wgpu_instance_create_surface_from_winit(WGPUInstanceId instance_id,
const WGPUWindow *window);
#endif

#if (defined(WGPU_LOCAL) && !defined(WGPU_BACKEND_GL))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to remove the WGPUWindow workaround in cbindgen.toml too

@kvark
Copy link
Member Author

kvark commented Aug 21, 2019

Great notes! I added support for Vulkan on Mac and removed the Window workaround from cbindgen.
bors r=grovesNL

bors bot added a commit that referenced this pull request Aug 21, 2019
301: Raw window handle support instead of winit r=grovesNL a=kvark

This removes `winit` and paves the way for gfx-rs/wgpu-rs#64

Co-authored-by: Dzmitry Malyshau <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 21, 2019

Canceled

@kvark
Copy link
Member Author

kvark commented Aug 21, 2019

bors r=grovesNL

bors bot added a commit that referenced this pull request Aug 21, 2019
301: Raw window handle support instead of winit r=grovesNL a=kvark

This removes `winit` and paves the way for gfx-rs/wgpu-rs#64

Co-authored-by: Dzmitry Malyshau <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 21, 2019

Build succeeded

@bors bors bot merged commit 1d36203 into gfx-rs:master Aug 21, 2019
@kvark kvark deleted the raw-handle branch August 24, 2021 17:03
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 this pull request may close these issues.

2 participants