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

Remove type parameter from Surface #2036

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Oct 13, 2022

Changelog (rename the existing section):

### Breaking changes
Changes to `Surface`, `Swapchain` and swapchain operations:
- `Surface`, `Swapchain`, `SwapchainImage` and `SwapchainAcquireFuture` and related functions no longer have a `W` type parameter.
- All constructors of `Surface` now take `Option<Arc<dyn Any + Send + Sync>>` instead of a generic `W`. The `window` function has been renamed to `object` and likewise returns `Option<&Arc<dyn Any + Send + Sync>>`.
- Vulkano-win: `create_surface_from_handle` takes an `Arc<impl Any + Send + Sync + HasRawWindowHandle + HasRawDisplayHandle>`, `create_surface_from_winit` takes an `Arc<Window>`.
- `PresentInfo` has been renamed to `SwapchainPresentInfo` and has differently named members and constructor.
- `acquire_next_image` returns an `u32` index to match Vulkan.

Following yesterday's Discord discussion. No longer having to deal with the W parameter will simplify the design of Vulkano a lot, because we will no longer need *Abstract traits to represent these types.

Copy link
Member

@AustinJ235 AustinJ235 left a comment

Choose a reason for hiding this comment

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

Good change, looks good!

@AustinJ235 AustinJ235 merged commit cdab36a into vulkano-rs:master Oct 20, 2022
AustinJ235 added a commit that referenced this pull request Oct 20, 2022
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