-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
bevy_render
should not depend on bevy_winit
#15565
Comments
I'm personally okay with any of these solutions, but a |
I like the |
Creating a crate just for cursors feels a bit pointless and like bloat. I would prefer to move the |
I'm on board with that plan. |
# Objective - Remove dependency in bevy_asset to bevy_winit - First step for #15565 ## Solution - the static `ANDROID_APP` and the `android_activity` reexport are now in `bevy_window` ## Migration Guide If you use the `android_activity` reexport from `bevy::winit::android_activity`, it is now in `bevy::window::android_activity`. Same for the `ANDROID_APP` static
# Objective - Remove dependency in bevy_asset to bevy_winit - First step for bevyengine#15565 ## Solution - the static `ANDROID_APP` and the `android_activity` reexport are now in `bevy_window` ## Migration Guide If you use the `android_activity` reexport from `bevy::winit::android_activity`, it is now in `bevy::window::android_activity`. Same for the `ANDROID_APP` static
Seems like reversing the dependency is not really desirable either. |
…it (#15649) # Objective - `bevy_render` should not depend on `bevy_winit` - Fixes #15565 ## Solution - `bevy_render` no longer depends on `bevy_winit` - The following is behind the `custom_cursor` feature - Move custom cursor code from `bevy_render` to `bevy_winit` behind the `custom_cursor` feature - `bevy_winit` now depends on `bevy_render` (for `Image` and `TextureFormat`) - `bevy_winit` now depends on `bevy_asset` (for `Assets`, `Handle` and `AssetId`) - `bevy_winit` now depends on `bytemuck` (already in tree) - Custom cursor code in `bevy_winit` reworked to use `AssetId` (other than that it is taken over 1:1) - Rework `bevy_winit` custom cursor interface visibility now that the logic is all contained in `bevy_winit` ## Testing - I ran the screenshot and window_settings examples - Tested on linux wayland so far --- ## Migration Guide `CursorIcon` and `CustomCursor` previously provided by `bevy::render::view::cursor` is now available from `bevy::winit`. A new feature `custom_cursor` enables this functionality (default feature).
Problem
#14284 added a direct, non-optional dependency on
bevy_winit
frombevy_render
.This is messy for our crate structure, and makes it much harder to use
bevy_render
on exotic platforms.It's also causing issues for contributors:
From @StrikeForceZero on Discord.
Proposed solution: revert the cursor icon PR.
Revert #14284 and reopen #14351.
Solves this problem very directly, at the expense of a valuable feature. Back to the drawing board, where none of the options seemed very good.
Proposed solution: make the dependency optional by feature-flagging cursor icons
Still messy, but something that can be worked around. Doesn't lose us the nice feature.
Proposed solution: bevy_cursors crate
Lift this code out into its own crate, which depends on
bevy_winit
andbevy_render
. Probably the cleanest conceptually, but now we have yet another tiny crate to maintain.The text was updated successfully, but these errors were encountered: